import status_params # server configurations config = Script.get_config() # security enabled security_enabled = status_params.security_enabled stack_name = default("/hostLevelParams/stack_name", None) # New Cluster Stack Version that is defined during the RESTART of a Stack Upgrade version = default("/commandParams/version", None) # hdp version stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version = format_hdp_stack_version(stack_version_unformatted) metadata_home = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else '/usr/hdp/current/atlas-server' metadata_bin = format("{metadata_home}/bin") python_binary = os.environ['PYTHON_EXE'] if 'PYTHON_EXE' in os.environ else sys.executable metadata_start_script = format("{metadata_bin}/atlas_start.py") metadata_stop_script = format("{metadata_bin}/atlas_stop.py") # metadata local directory structure log_dir = config['configurations']['atlas-env']['metadata_log_dir'] conf_dir = status_params.conf_dir # "/etc/metadata/conf" # service locations hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") if 'HADOOP_HOME' in os.environ else '/etc/hadoop/conf'
import os import sys from resource_management import format_hdp_stack_version, Script from resource_management.libraries.functions import format import status_params # server configurations config = Script.get_config() # security enabled security_enabled = status_params.security_enabled # hdp version stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version = format_hdp_stack_version(stack_version_unformatted) metadata_home = os.environ[ 'METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else '/usr/hdp/current/atlas-server' metadata_bin = format("{metadata_home}/bin") python_binary = os.environ[ 'PYTHON_EXE'] if 'PYTHON_EXE' in os.environ else sys.executable metadata_start_script = format("{metadata_bin}/metadata_start.py") metadata_stop_script = format("{metadata_bin}/metadata_stop.py") # metadata local directory structure log_dir = config['configurations']['metadata-env']['metadata_log_dir'] conf_dir = status_params.conf_dir # "/etc/metadata/conf" # service locations