Просмотр исходного кода

Revert "AMBARI-18237. Certain configuration files cannot be modified through Ambari api. (aonishuk)"

This reverts commit 80a6b01415cba7f011be1551ea24bef7cbfe393c.
Andrew Onishuk 9 лет назад
Родитель
Сommit
44e64e5f67

+ 1 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py

@@ -40,12 +40,11 @@ stack_version_formatted = format_stack_version(stack_version_unformatted)
 
 dfs_type = default("/commandParams/dfs_type", "")
 hadoop_conf_dir = "/etc/hadoop/conf"
+
 component_list = default("/localComponents", [])
 
 hdfs_tmp_dir = config['configurations']['hadoop-env']['hdfs_tmp_dir']
 
-hadoop_metrics2_properties_content = config['configurations']['hadoop-metrics2.properties']['content']
-
 # hadoop default params
 mapreduce_libs_path = "/usr/lib/hadoop-mapreduce/*"
 

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py

@@ -101,7 +101,7 @@ def setup_hadoop():
       File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"),
            owner=params.hdfs_user,
            group=params.user_group,
-           content=InlineTemplate(params.hadoop_metrics2_properties_content)
+           content=Template("hadoop-metrics2.properties.j2")
       )
 
     if params.dfs_type == 'HCFS' and params.has_core_site and 'ECS_CLIENT' in params.component_list: