def __setup_master_specific_conf_files(): """ Sets up config files only applicable for HAWQ Master and Standby nodes """ import params params.File(hawq_constants.hawq_check_file, content=params.hawq_check_content) params.File(hawq_constants.hawq_slaves_file, content=InlineTemplate("{% for host in hawqsegment_hosts %}{{host}}\n{% endfor %}"))
def run_hawq_check(self, env): import params Logger.info("Executing HAWQ Check ...") params.File( hawq_constants.hawq_hosts_file, content=InlineTemplate( "{% for host in hawq_all_hosts %}{{host}}\n{% endfor %}")) additional_flags = list() if params.dfs_nameservice: additional_flags.append("--hdfs-ha") if params.hawq_global_rm_type == "yarn": yarn_option = "--yarn-ha" if params.is_yarn_ha_enabled else "--yarn" additional_flags.append(yarn_option) if str(params.security_enabled).lower() == "true": additional_flags.append("--kerberos") utils.exec_hawq_operation( hawq_constants.CHECK, "-f {1} --hadoop {2} --config {3} {4}".format( hawq_constants.hawq_greenplum_path_file, hawq_constants.hawq_hosts_file, stack_select.get_hadoop_dir('home'), hawq_constants.hawq_check_file, " ".join(additional_flags)), host_name=params.hawqmaster_host)
def run_hawq_check(self, env): import params Logger.info("Executing HAWQ Check ...") params.File(hawq_constants.hawq_hosts_file, content=InlineTemplate("{% for host in hawq_all_hosts %}{{host}}\n{% endfor %}")) Execute("source {0} && hawq check -f {1} --hadoop {2} --config {3}".format(hawq_constants.hawq_greenplum_path_file, hawq_constants.hawq_hosts_file, stack_select.get_hadoop_dir('home'), hawq_constants.hawq_check_file), user=hawq_constants.hawq_user, timeout=hawq_constants.default_exec_timeout)