Exemplo n.º 1
0
def setup_common_configurations():
  """
  Sets up the config files common to master, standby and segment nodes.
  """
  import params

  params.XmlConfig("hdfs-client.xml",
                   configurations=params.hdfs_client,
                   configuration_attributes=params.config_attrs['hdfs-client'])

  params.XmlConfig("yarn-client.xml",
                   configurations=params.yarn_client,
                   configuration_attributes=params.config_attrs['yarn-client'])

  params.XmlConfig("hawq-site.xml",
                   configurations=params.hawq_site,
                   configuration_attributes=params.config_attrs['hawq-site'])
  __set_osparams()
Exemplo n.º 2
0
    def activate_hawq_standby(self, env):
        import params
        import utils
        Logger.info("Activating HAWQ standby...")
        params.XmlConfig(
            "hawq-site.xml",
            configurations=params.hawq_site,
            configuration_attributes=params.config_attrs['hawq-site'])
        utils.exec_hawq_operation(
            hawq_constants.ACTIVATE,
            "{0} -a -M {1} -v --ignore-bad-hosts".format(
                hawq_constants.STANDBY, hawq_constants.FAST))

        # Stop the new HAWQMASTER as the process might be running at an old port,
        # which might cause a failure in Start HAWQ Service step in the Activate HAWQ Standby Master Wizard
        common.stop_component(hawq_constants.MASTER, hawq_constants.FAST)