コード例 #1
0
def start_greenplum(env=None):
    with open("/tmp/active_master_host", "w") as fh:
        fh.write(str(active_master_helper.get_active_master_host()))
    if active_master_helper.is_localhost_active_master():
        check_port_conflict()  # Proceed only if there is no port conflict
        if is_greenplum_initialized():
            execute_start_command(env=None)
        else:
            init_greenplum(env=None)  # Init will start the database as well
    else:
        Logger.info("This host is not the active master, skipping requested operation.")
コード例 #2
0
ファイル: gpdb.py プロジェクト: xiaohao91/ambari-gpdb-plugin
def start_greenplum(env=None):
    with open("/tmp/active_master_host", "w") as fh:
        fh.write(str(active_master_helper.get_active_master_host()))
    if active_master_helper.is_localhost_active_master():
        check_port_conflict()  # Proceed only if there is no port conflict
        if is_greenplum_initialized():
            execute_start_command(env=None)
        else:
            init_greenplum(env=None)  # Init will start the database as well
    else:
        Logger.info(
            "This host is not the active master, skipping requested operation."
        )
コード例 #3
0
    def service_check(self, env):
        import params
        self.active_master_host = active_master_helper.get_active_master_host()

        gpdb.verify_segments_state(env, self.active_master_host)

        self.drop_table()
        try:
            self.create_table()
            self.insert_data()
            self.query_data()
            self.check_data_correctness()
            self.cleanup()
        except:
            self.cleanup()
            raise
コード例 #4
0
  def service_check(self, env):
    import params
    self.active_master_host = active_master_helper.get_active_master_host()

    gpdb.verify_segments_state(env, self.active_master_host)

    self.drop_table()
    try:
      self.create_table()
      self.insert_data()
      self.query_data()
      self.check_data_correctness()
      self.cleanup()
    except:
      self.cleanup()
      raise