You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/09/18 19:15:01 UTC
git commit: AMBARI-7392. HCatalog config downloads Hive config files
(aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 31a410662 -> 3bbbb5ec8
AMBARI-7392. HCatalog config downloads Hive config files (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3bbbb5ec
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3bbbb5ec
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3bbbb5ec
Branch: refs/heads/trunk
Commit: 3bbbb5ec804bf2a2dadff6348f1fdfa5b64295f1
Parents: 31a4106
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Sep 18 20:14:34 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Sep 18 20:14:34 2014 +0300
----------------------------------------------------------------------
.../1.3.2/hooks/before-START/scripts/params.py | 2 +-
.../services/HIVE/configuration/hcat-env.xml | 57 ++++++++++++++++++++
.../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 19 +------
.../1.3.2/services/HIVE/package/scripts/hcat.py | 13 ++---
.../services/HIVE/package/scripts/params.py | 2 +
.../HIVE/package/templates/hcat-env.sh.j2 | 44 ---------------
.../services/HIVE/configuration/hcat-env.xml | 57 ++++++++++++++++++++
.../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 19 +------
.../2.0.6/services/HIVE/package/scripts/hcat.py | 13 ++---
.../services/HIVE/package/scripts/params.py | 1 +
.../HIVE/package/templates/hcat-env.sh.j2 | 43 ---------------
.../stacks/1.3.2/HIVE/test_hcat_client.py | 20 +++----
.../python/stacks/1.3.2/configs/default.json | 5 +-
.../python/stacks/1.3.2/configs/secured.json | 5 +-
.../stacks/2.0.6/HIVE/test_hcat_client.py | 18 ++++---
.../python/stacks/2.0.6/configs/default.json | 5 +-
.../python/stacks/2.0.6/configs/secured.json | 5 +-
17 files changed, 166 insertions(+), 162 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
index 51f8d61..a6aff0e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
@@ -94,7 +94,7 @@ ambari_db_rca_driver = config['hostLevelParams']['ambari_db_rca_driver']
ambari_db_rca_username = config['hostLevelParams']['ambari_db_rca_username']
ambari_db_rca_password = config['hostLevelParams']['ambari_db_rca_password']
-if has_namenode and 'rca_enabled' in config['configurations']['mapred-env']:
+if has_namenode and 'mapred-env' in config['configurations']:
rca_enabled = config['configurations']['mapred-env']['rca_enabled']
else:
rca_enabled = False
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
new file mode 100644
index 0000000..91b402b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+ <!-- hcat-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for hcat-env.sh file</description>
+ <value>
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements. See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership. The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # "License"); you may not use this file except in compliance
+ # with the License. You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+ JAVA_HOME={{java64_home}}
+ HCAT_PID_DIR={{hcat_pid_dir}}/
+ HCAT_LOG_DIR={{hcat_log_dir}}/
+ HCAT_CONF_DIR={{hcat_conf_dir}}
+ HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
+ #DBROOT is the path where the connector jars are downloaded
+ DBROOT={{hcat_dbroot}}
+ USER={{hcat_user}}
+ METASTORE_PORT={{hive_metastore_port}}
+ </value>
+ </property>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml
index c78de04..80459d1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml
@@ -165,24 +165,9 @@
</commandScript>
<configFiles>
<configFile>
- <type>xml</type>
- <fileName>hive-site.xml</fileName>
- <dictionaryName>hive-site</dictionaryName>
- </configFile>
- <configFile>
<type>env</type>
- <fileName>hive-env.sh</fileName>
- <dictionaryName>hive-env</dictionaryName>
- </configFile>
- <configFile>
- <type>env</type>
- <fileName>hive-log4j.properties</fileName>
- <dictionaryName>hive-log4j</dictionaryName>
- </configFile>
- <configFile>
- <type>env</type>
- <fileName>hive-exec-log4j.properties</fileName>
- <dictionaryName>hive-exec-log4j</dictionaryName>
+ <fileName>hcat-env.sh</fileName>
+ <dictionaryName>hcat-env</dictionaryName>
</configFile>
</configFiles>
</component>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hcat.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hcat.py
index d14ea66..3865dc0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/hcat.py
@@ -43,13 +43,8 @@ def hcat():
group=params.user_group,
mode=0644)
- hcat_TemplateConfig('hcat-env.sh')
-
-
-def hcat_TemplateConfig(name):
- import params
-
- TemplateConfig(format("{hcat_conf_dir}/{name}"),
- owner=params.hcat_user,
- group=params.user_group
+ File(format("{hcat_conf_dir}/hcat-env.sh"),
+ owner=params.hcat_user,
+ group=params.user_group,
+ content=InlineTemplate(params.hcat_env_sh_template)
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
index 2285cac..f27c28c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
@@ -134,6 +134,8 @@ hcat_log_dir = config['configurations']['hive-env']['hcat_log_dir'] #hcat_log_
hadoop_conf_dir = '/etc/hadoop/conf'
+hcat_env_sh_template = config['configurations']['hcat-env']['content']
+
#hive-log4j.properties.template
if (('hive-log4j' in config['configurations']) and ('content' in config['configurations']['hive-log4j'])):
log4j_props = config['configurations']['hive-log4j']['content']
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/templates/hcat-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/templates/hcat-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/templates/hcat-env.sh.j2
deleted file mode 100644
index 7432afe..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/templates/hcat-env.sh.j2
+++ /dev/null
@@ -1,44 +0,0 @@
-{#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#}
-
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-JAVA_HOME={{java64_home}}
-HCAT_PID_DIR={{hcat_pid_dir}}/
-HCAT_LOG_DIR={{hcat_log_dir}}/
-HCAT_CONF_DIR={{hcat_conf_dir}}
-HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
-#DBROOT is the path where the connector jars are downloaded
-DBROOT={{hcat_dbroot}}
-USER={{hcat_user}}
-METASTORE_PORT={{hive_metastore_port}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hcat-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hcat-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hcat-env.xml
new file mode 100644
index 0000000..91b402b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hcat-env.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+ <!-- hcat-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for hcat-env.sh file</description>
+ <value>
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements. See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership. The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # "License"); you may not use this file except in compliance
+ # with the License. You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+ JAVA_HOME={{java64_home}}
+ HCAT_PID_DIR={{hcat_pid_dir}}/
+ HCAT_LOG_DIR={{hcat_log_dir}}/
+ HCAT_CONF_DIR={{hcat_conf_dir}}
+ HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
+ #DBROOT is the path where the connector jars are downloaded
+ DBROOT={{hcat_dbroot}}
+ USER={{hcat_user}}
+ METASTORE_PORT={{hive_metastore_port}}
+ </value>
+ </property>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml
index 483a66f..08b1e74 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml
@@ -177,24 +177,9 @@
</commandScript>
<configFiles>
<configFile>
- <type>xml</type>
- <fileName>hive-site.xml</fileName>
- <dictionaryName>hive-site</dictionaryName>
- </configFile>
- <configFile>
<type>env</type>
- <fileName>hive-env.sh</fileName>
- <dictionaryName>hive-env</dictionaryName>
- </configFile>
- <configFile>
- <type>env</type>
- <fileName>hive-log4j.properties</fileName>
- <dictionaryName>hive-log4j</dictionaryName>
- </configFile>
- <configFile>
- <type>env</type>
- <fileName>hive-exec-log4j.properties</fileName>
- <dictionaryName>hive-exec-log4j</dictionaryName>
+ <fileName>hcat-env.sh</fileName>
+ <dictionaryName>hcat-env</dictionaryName>
</configFile>
</configFiles>
</component>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py
index eb05481..583ca42 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat.py
@@ -49,13 +49,8 @@ def hcat():
group=params.user_group,
mode=0644)
- hcat_TemplateConfig('hcat-env.sh')
-
-
-def hcat_TemplateConfig(name):
- import params
-
- TemplateConfig(format("{hcat_conf_dir}/{name}"),
- owner=params.hcat_user,
- group=params.user_group
+ File(format("{hcat_conf_dir}/hcat-env.sh"),
+ owner=params.hcat_user,
+ group=params.user_group,
+ content=InlineTemplate(params.hcat_env_sh_template)
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
index 82cf9db..dd6e3c3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
@@ -190,6 +190,7 @@ webhcat_user = config['configurations']['hive-env']['webhcat_user']
hcat_pid_dir = status_params.hcat_pid_dir
hcat_log_dir = config['configurations']['hive-env']['hcat_log_dir']
+hcat_env_sh_template = config['configurations']['hcat-env']['content']
#hive-log4j.properties.template
if (('hive-log4j' in config['configurations']) and ('content' in config['configurations']['hive-log4j'])):
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/hcat-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/hcat-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/hcat-env.sh.j2
deleted file mode 100644
index 0b9dcc3..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/hcat-env.sh.j2
+++ /dev/null
@@ -1,43 +0,0 @@
-{#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#}
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-JAVA_HOME={{java64_home}}
-HCAT_PID_DIR={{hcat_pid_dir}}/
-HCAT_LOG_DIR={{hcat_log_dir}}/
-HCAT_CONF_DIR={{hcat_conf_dir}}
-HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
-#DBROOT is the path where the connector jars are downloaded
-DBROOT={{hcat_dbroot}}
-USER={{hcat_user}}
-METASTORE_PORT={{hive_metastore_port}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hcat_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hcat_client.py
index a57455b..bff8218 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hcat_client.py
@@ -45,11 +45,11 @@ class TestHcatClient(RMFTestCase):
configurations = self.getConfig()['configurations']['hive-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
)
-
- self.assertResourceCalled('TemplateConfig', '/etc/hcatalog/conf/hcat-env.sh',
- owner = 'hcat',
- group = 'hadoop',
- )
+ self.assertResourceCalled('File', '/etc/hcatalog/conf/hcat-env.sh',
+ content = InlineTemplate(self.getConfig()['configurations']['hcat-env']['content']),
+ owner = 'hcat',
+ group = 'hadoop',
+ )
self.assertNoMoreResources()
@@ -78,9 +78,9 @@ class TestHcatClient(RMFTestCase):
configurations = self.getConfig()['configurations']['hive-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
)
-
- self.assertResourceCalled('TemplateConfig', '/etc/hcatalog/conf/hcat-env.sh',
- owner = 'hcat',
- group = 'hadoop',
- )
+ self.assertResourceCalled('File', '/etc/hcatalog/conf/hcat-env.sh',
+ content = InlineTemplate(self.getConfig()['configurations']['hcat-env']['content']),
+ owner = 'hcat',
+ group = 'hadoop',
+ )
self.assertNoMoreResources()
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
index 70dee1b..c5c162f 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
+++ b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
@@ -286,7 +286,10 @@
},
"webhcat-env": {
"content": "\n# The file containing the running pid\nPID_FILE={{pid_file}}\n\nTEMPLETON_LOG_DIR={{templeton_log_dir}}/\n\n\nWEBHCAT_LOG_DIR={{templeton_log_dir}}/\n\n# The console error log\nERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log\n\n# The console log\nCONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log\n\n#TEMPLETON_JAR=templeton_jar_name\n\n#HADOOP_PREFIX=hadoop_prefix\n\n#HCAT_PREFIX=hive_prefix\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=/usr/lib/hadoop\n "
- },
+ },
+ "hcat-env": {
+ "content": "JAVA_HOME={{java64_home}}\n HCAT_PID_DIR={{hcat_pid_dir}}/\n HCAT_LOG_DIR={{hcat_log_dir}}/\n HCAT_CONF_DIR={{hcat_conf_dir}}\n HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n #DBROOT is the path where the connector jars are downloaded\n DBROOT={{hcat_dbroot}}\n USER={{hcat_user}}\n METASTORE_PORT={{hive_metastore_port}}"
+ },
"oozie-env": {
"oozie_derby_database": "Derby",
"oozie_admin_port": "11001",
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
index 6c03d80..a49d623 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
@@ -458,7 +458,10 @@
},
"webhcat-env": {
"content": "\n# The file containing the running pid\nPID_FILE={{pid_file}}\n\nTEMPLETON_LOG_DIR={{templeton_log_dir}}/\n\n\nWEBHCAT_LOG_DIR={{templeton_log_dir}}/\n\n# The console error log\nERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log\n\n# The console log\nCONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log\n\n#TEMPLETON_JAR=templeton_jar_name\n\n#HADOOP_PREFIX=hadoop_prefix\n\n#HCAT_PREFIX=hive_prefix\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=/usr/lib/hadoop\n "
- },
+ },
+ "hcat-env": {
+ "content": "JAVA_HOME={{java64_home}}\n HCAT_PID_DIR={{hcat_pid_dir}}/\n HCAT_LOG_DIR={{hcat_log_dir}}/\n HCAT_CONF_DIR={{hcat_conf_dir}}\n HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n #DBROOT is the path where the connector jars are downloaded\n DBROOT={{hcat_dbroot}}\n USER={{hcat_user}}\n METASTORE_PORT={{hive_metastore_port}}"
+ },
"oozie-env": {
"oozie_derby_database": "Derby",
"oozie_admin_port": "11001",
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
index 2a5481c..f1d7ed9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
@@ -48,10 +48,11 @@ class TestHcatClient(RMFTestCase):
configurations = self.getConfig()['configurations']['hive-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
)
- self.assertResourceCalled('TemplateConfig', '/etc/hcatalog/conf/hcat-env.sh',
- owner = 'hcat',
- group = 'hadoop',
- )
+ self.assertResourceCalled('File', '/etc/hcatalog/conf/hcat-env.sh',
+ content = InlineTemplate(self.getConfig()['configurations']['hcat-env']['content']),
+ owner = 'hcat',
+ group = 'hadoop',
+ )
self.assertNoMoreResources()
@@ -82,9 +83,10 @@ class TestHcatClient(RMFTestCase):
configurations = self.getConfig()['configurations']['hive-site'],
configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
)
- self.assertResourceCalled('TemplateConfig', '/etc/hcatalog/conf/hcat-env.sh',
- owner = 'hcat',
- group = 'hadoop',
- )
+ self.assertResourceCalled('File', '/etc/hcatalog/conf/hcat-env.sh',
+ content = InlineTemplate(self.getConfig()['configurations']['hcat-env']['content']),
+ owner = 'hcat',
+ group = 'hadoop',
+ )
self.assertNoMoreResources()
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/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 9cdf773..0c3422f 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
@@ -542,7 +542,10 @@
},
"webhcat-env": {
"content": "\n# The file containing the running pid\nPID_FILE={{pid_file}}\n\nTEMPLETON_LOG_DIR={{templeton_log_dir}}/\n\n\nWEBHCAT_LOG_DIR={{templeton_log_dir}}/\n\n# The console error log\nERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log\n\n# The console log\nCONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log\n\n#TEMPLETON_JAR=templeton_jar_name\n\n#HADOOP_PREFIX=hadoop_prefix\n\n#HCAT_PREFIX=hive_prefix\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=/usr/lib/hadoop"
- },
+ },
+ "hcat-env": {
+ "content": "JAVA_HOME={{java64_home}}\n HCAT_PID_DIR={{hcat_pid_dir}}/\n HCAT_LOG_DIR={{hcat_log_dir}}/\n HCAT_CONF_DIR={{hcat_conf_dir}}\n HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n #DBROOT is the path where the connector jars are downloaded\n DBROOT={{hcat_dbroot}}\n USER={{hcat_user}}\n METASTORE_PORT={{hive_metastore_port}}"
+ },
"pig-env": {
"content": "\nJAVA_HOME={{java64_home}}\nHADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\nif [ -d \"/usr/lib/tez\" ]; then\n PIG_OPTS=\"$PIG_OPTS -Dmapreduce.framework.name=yarn\"\nfi"
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/3bbbb5ec/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index 110003f..3642af6 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -573,7 +573,10 @@
},
"webhcat-env": {
"content": "\n# The file containing the running pid\nPID_FILE={{pid_file}}\n\nTEMPLETON_LOG_DIR={{templeton_log_dir}}/\n\n\nWEBHCAT_LOG_DIR={{templeton_log_dir}}/\n\n# The console error log\nERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log\n\n# The console log\nCONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log\n\n#TEMPLETON_JAR=templeton_jar_name\n\n#HADOOP_PREFIX=hadoop_prefix\n\n#HCAT_PREFIX=hive_prefix\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=/usr/lib/hadoop"
- },
+ },
+ "hcat-env": {
+ "content": "JAVA_HOME={{java64_home}}\n HCAT_PID_DIR={{hcat_pid_dir}}/\n HCAT_LOG_DIR={{hcat_log_dir}}/\n HCAT_CONF_DIR={{hcat_conf_dir}}\n HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n #DBROOT is the path where the connector jars are downloaded\n DBROOT={{hcat_dbroot}}\n USER={{hcat_user}}\n METASTORE_PORT={{hive_metastore_port}}"
+ },
"pig-env": {
"content": "\nJAVA_HOME={{java64_home}}\nHADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\nif [ -d \"/usr/lib/tez\" ]; then\n PIG_OPTS=\"$PIG_OPTS -Dmapreduce.framework.name=yarn\"\nfi"
},