You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/08/28 19:50:18 UTC
[43/45] git commit: AMBARI-7062. Client Config Download: log4j
properties filenames should be the same as on an installed cluster host.
(dlysnichenko)
AMBARI-7062. Client Config Download: log4j properties filenames should be the same as on an installed cluster host. (dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1bdc818
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1bdc818
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1bdc818
Branch: refs/heads/branch-alerts-dev
Commit: d1bdc818e5d4c481d43955bcd7f4ece253b15eb5
Parents: 86d4083
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Thu Aug 28 20:34:34 2014 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Thu Aug 28 20:34:34 2014 +0300
----------------------------------------------------------------------
.../python/resource_management/libraries/script/script.py | 9 ++++++---
.../stacks/HDP/1.3.2/services/HBASE/metainfo.xml | 2 +-
.../resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml | 4 ++--
.../stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml | 9 ++-------
.../resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml | 2 +-
.../stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml | 2 +-
.../stacks/HDP/2.0.6/services/HBASE/metainfo.xml | 2 +-
.../resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml | 4 ++--
.../resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml | 10 +---------
.../resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml | 4 ++--
.../stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml | 2 +-
.../resources/stacks/HDP/2.1/services/FALCON/metainfo.xml | 10 ++++++++++
.../src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py | 4 ++++
.../src/test/python/stacks/2.0.6/configs/default.json | 2 +-
14 files changed, 35 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 7b7d931..80bfeab 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -258,10 +258,13 @@ class Script(object):
configuration_attributes=params.config['configuration_attributes'][dict],
)
for file_dict in env_configs_list:
- for filename,dict in file_dict.iteritems():
+ for filename,dicts in file_dict.iteritems():
+ content = ''
+ for dict in dicts.split(','):
+ if dict.strip() in params.config['configurations']:
+ content += params.config['configurations'][dict.strip()]['content']
File(os.path.join(conf_tmp_dir, filename),
- content=InlineTemplate(params.config['configurations'][dict]['content'])
- )
+ content=InlineTemplate(content))
with closing(tarfile.open(output_filename, "w:gz")) as tar:
tar.add(conf_tmp_dir, arcname=os.path.basename("."))
tar.close()
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml
index f209475..090bad8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml
@@ -108,7 +108,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>hbase-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>hbase-log4j</dictionaryName>
</configFile>
</configFiles>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml
index 7112c31..2aa0590 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml
@@ -99,8 +99,8 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>hdfs-log4j.properties</fileName>
- <dictionaryName>hdfs-log4j</dictionaryName>
+ <fileName>log4j.properties</fileName>
+ <dictionaryName>hdfs-log4j,mapreduce-log4j</dictionaryName>
</configFile>
</configFiles>
</component>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml
index facdc07..875b858 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/metainfo.xml
@@ -82,13 +82,8 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>mapred-env.sh</fileName>
- <dictionaryName>mapred-env</dictionaryName>
- </configFile>
- <configFile>
- <type>env</type>
- <fileName>mapreduce-log4j.properties</fileName>
- <dictionaryName>mapreduce-log4j</dictionaryName>
+ <fileName>log4j.properties</fileName>
+ <dictionaryName>hdfs-log4j,mapreduce-log4j</dictionaryName>
</configFile>
</configFiles>
</component>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml
index 8e87a50..85d5961 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml
@@ -42,7 +42,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>pig-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>pig-log4j</dictionaryName>
</configFile>
<configFile>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml
index 4cdb1c8..21234db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml
@@ -54,7 +54,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>zookeeper-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>zookeeper-log4j</dictionaryName>
</configFile>
</configFiles>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
index 67d4adf..0816591 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
@@ -98,7 +98,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>hbase-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>hbase-log4j</dictionaryName>
</configFile>
</configFiles>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml
index 57308c0..8bb0369 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml
@@ -103,8 +103,8 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>hdfs-log4j.properties</fileName>
- <dictionaryName>hdfs-log4j</dictionaryName>
+ <fileName>log4j.properties</fileName>
+ <dictionaryName>hdfs-log4j,yarn-log4j</dictionaryName>
</configFile>
<configFile>
<type>env</type>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml
index a41d1f7..27bf492 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml
@@ -42,7 +42,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>pig-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>pig-log4j</dictionaryName>
</configFile>
<configFile>
@@ -70,14 +70,6 @@
<timeout>300</timeout>
</commandScript>
- <configFiles>
- <configFile>
- <type>env</type>
- <fileName>pig-env.sh</fileName>
- <dictionaryName>pig-env</dictionaryName>
- </configFile>
- </configFiles>
-
<requiredServices>
<service>YARN</service>
</requiredServices>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml
index dd0a780..fc49b27 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml
@@ -99,8 +99,8 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>yarn-log4j.properties</fileName>
- <dictionaryName>yarn-log4j</dictionaryName>
+ <fileName>log4j.properties</fileName>
+ <dictionaryName>hdfs-log4j,yarn-log4j</dictionaryName>
</configFile>
<configFile>
<type>xml</type>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml
index 66713a0..2b1bfdb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml
@@ -53,7 +53,7 @@
</configFile>
<configFile>
<type>env</type>
- <fileName>zookeeper-log4j.properties</fileName>
+ <fileName>log4j.properties</fileName>
<dictionaryName>zookeeper-log4j</dictionaryName>
</configFile>
</configFiles>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml
index e8af69d..0a79704 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml
@@ -40,6 +40,16 @@
<fileName>falcon-env.sh</fileName>
<dictionaryName>falcon-env</dictionaryName>
</configFile>
+ <configFile>
+ <type>xml</type>
+ <fileName>runtime.properties</fileName>
+ <dictionaryName>falcon-runtime.properties</dictionaryName>
+ </configFile>
+ <configFile>
+ <type>xml</type>
+ <fileName>startup.properties</fileName>
+ <dictionaryName>falcon-startup.properties</dictionaryName>
+ </configFile>
</configFiles>
</component>
<component>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
index 1a9e1f8..0a4bfb5 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
@@ -48,6 +48,10 @@ class Test(RMFTestCase):
self.assertResourceCalled('File', '/tmp/123/hadoop-env.sh',
content = InlineTemplate(self.getConfig()['configurations']['hadoop-env']['content']),
)
+ self.assertResourceCalled('File', '/tmp/123/log4j.properties',
+ content = InlineTemplate(self.getConfig()['configurations']['hdfs-log4j']['content']+
+ self.getConfig()['configurations']['yarn-log4j']['content']),
+ )
self.assertResourceCalled('Directory', '/tmp/123',
action = ['delete'],
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1bdc818/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index c8e8588..f563bb0 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -28,7 +28,7 @@
"excluded_hosts": "host1,host2",
"mark_draining_only" : "false",
"xml_configs_list":[{"hdfs-site.xml":"hdfs-site"}],
- "env_configs_list":[{"hadoop-env.sh":"hadoop-env"}],
+ "env_configs_list":[{"hadoop-env.sh":"hadoop-env"},{"log4j.properties":"hdfs-log4j,yarn-log4j"}],
"output_file":"HDFS_CLIENT-configs.tar.gz"
},