def __start_segment(self): import params return utils.exec_hawq_operation( hawqconstants.START, "{0} -a".format(hawqconstants.SEGMENT), not_if=utils.chk_hawq_process_status_cmd( params.hawq_segment_address_port))
def stop(self, env): import params utils.exec_hawq_operation(hawqconstants.STOP, "{0} -a".format(hawqconstants.SEGMENT), only_if=utils.chk_hawq_process_status_cmd( params.hawq_segment_address_port))
def stop(self, env, mode=hawq_constants.FAST): import params utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format( hawq_constants.SEGMENT, mode), only_if=utils.chk_hawq_process_status_cmd( params.hawq_segment_address_port))
def stop_component(component_name, port, mode): """ Stops the component """ utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format(component_name, mode), only_if=utils.chk_hawq_process_status_cmd( port, component_name))
def stop(mode=hawq_constants.FAST, component=None): """ Stops the HAWQ Master/Standby, if component is cluster performs cluster level operation from master """ import params component_name = component if component else __get_component_name() utils.exec_hawq_operation( hawq_constants.STOP, "{0} -M {1} -a -v".format(component_name, mode), only_if=utils.chk_hawq_process_status_cmd(params.hawq_master_address_port, component_name))
def stop_master(): """ Stops the HAWQ Master/Standby """ import params component_name = __get_component_name() utils.exec_hawq_operation(hawqconstants.STOP, "{0} -a".format(component_name), only_if=utils.chk_hawq_process_status_cmd( params.hawq_master_address_port, component_name))
def __start_local_master(): """ Starts HAWQ Master or HAWQ Standby Master component on the host """ import params component_name = __get_component_name() utils.exec_hawq_operation(hawqconstants.START, "{0} -a".format(component_name), not_if=utils.chk_hawq_process_status_cmd( params.hawq_master_address_port, component_name))
def start_component(component_name, port, data_dir): """ If data directory exists start the component, else initialize the component """ __check_dfs_truncate_enforced() if os.path.exists( os.path.join(data_dir, hawq_constants.postmaster_opts_filename)): return utils.exec_hawq_operation( hawq_constants.START, "{0} -a -v".format(component_name), not_if=utils.chk_hawq_process_status_cmd(port)) __init_component(component_name)
def __start_local_master(): """ Starts HAWQ Master or HAWQ Standby Master component on the host """ import params component_name = __get_component_name() __setup_hdfs_dirs() utils.exec_hawq_operation( hawq_constants.START, "{0} -a -v".format(component_name), not_if=utils.chk_hawq_process_status_cmd(params.hawq_master_address_port, component_name)) Logger.info("Master {0} started".format(params.hostname))
def stop(self, env, mode=hawq_constants.FAST): import params utils.exec_hawq_operation(hawq_constants.STOP, "{0} -M {1} -a -v".format(hawq_constants.SEGMENT, mode), only_if=utils.chk_hawq_process_status_cmd( params.hawq_segment_address_port))
def __start_segment(self): import params return utils.exec_hawq_operation( hawq_constants.START, "{0} -a -v".format(hawq_constants.SEGMENT), not_if=utils.chk_hawq_process_status_cmd(params.hawq_segment_address_port))