AMBARI-7383. cannot start HS2 (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21ff3830 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21ff3830 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21ff3830 Branch: refs/heads/branch-alerts-dev Commit: 21ff383056dd9fa3c84fb952135b37126693aa53 Parents: 19bf2a6 Author: Andrew Onishuk <[email protected]> Authored: Thu Sep 18 16:01:54 2014 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Thu Sep 18 16:01:54 2014 +0300 ---------------------------------------------------------------------- .../HIVE/package/scripts/install_jars.py | 29 +++++++------------- .../services/HIVE/package/scripts/params.py | 8 ++++++ .../2.1/services/TEZ/configuration/tez-site.xml | 2 +- .../services/TEZ/configuration/tez-site.xml | 29 ++++++++++++++++++++ .../2.2/services/TEZ/configuration/tez-site.xml | 29 ++++++++++++++++++++ .../stacks/2.0.6/HIVE/test_hive_server.py | 13 ++------- 6 files changed, 79 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py index 0045fee..f09794c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py @@ -64,25 +64,16 @@ def install_tez_jars(): pass if app_dir_path: - CopyFromLocal(params.tez_local_api_jars, - mode=0755, - owner=params.tez_user, - dest_dir=app_dir_path, - kinnit_if_needed=kinit_if_needed, - hdfs_user=params.hdfs_user, - hadoop_conf_dir=params.hadoop_conf_dir - ) - - CopyFromLocal(params.tez_tar_file, - owner=params.tez_user, - mode=0755, - dest_dir=app_dir_path, - dest_file="tez.tar.gz", - kinnit_if_needed=kinit_if_needed, - hdfs_user=params.hdfs_user, - hadoop_conf_dir=params.hadoop_conf_dir - ) - pass + for scr_file, dest_file in params.app_dir_files.iteritems(): + CopyFromLocal(scr_file, + mode=0755, + owner=params.tez_user, + dest_dir=app_dir_path, + dest_file=dest_file, + kinnit_if_needed=kinit_if_needed, + hdfs_user=params.hdfs_user, + hadoop_conf_dir=params.hadoop_conf_dir + ) if lib_dir_path: CopyFromLocal(params.tez_local_lib_jars, http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/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 ab86ff7..82cf9db 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 @@ -269,6 +269,14 @@ webhcat_hdfs_user_mode = 0755 #for create_hdfs_directory security_param = "true" if security_enabled else "false" +if str(hdp_stack_version).startswith('2.0') or str(hdp_stack_version).startswith('2.1'): + app_dir_files = {tez_local_api_jars:None} +else: + app_dir_files = { + tez_local_api_jars:None, + tez_tar_file:"tez.tar.gz" + } + import functools #create partial functions with common arguments for every HdfsDirectory call #to create hdfs directory we need to call params.HdfsDirectory in code http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml index 7b34d3b..218c508 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml @@ -21,7 +21,7 @@ <property> <name>tez.lib.uris</name> - <value>hdfs:///apps/tez/,hdfs:///apps/tez/lib/,hdfs:///apps/tez/tez.tar.gz</value> + <value>hdfs:///apps/tez/,hdfs:///apps/tez/lib/</value> <description>The location of the Tez libraries which will be localized for DAGs</description> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/ambari-server/src/main/resources/stacks/HDP/2.2.1/services/TEZ/configuration/tez-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2.1/services/TEZ/configuration/tez-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2.1/services/TEZ/configuration/tez-site.xml new file mode 100644 index 0000000..dfedb6b --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.2.1/services/TEZ/configuration/tez-site.xml @@ -0,0 +1,29 @@ +<?xml version="1.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. +--> + +<configuration supports_final="true"> + + <property> + <name>tez.lib.uris</name> + <value>hdfs:///apps/tez/,hdfs:///apps/tez/lib/,hdfs:///apps/tez/tez.tar.gz</value> + <description>The location of the Tez libraries which will be localized for DAGs</description> + </property> + +</configuration> + http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml new file mode 100644 index 0000000..dfedb6b --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml @@ -0,0 +1,29 @@ +<?xml version="1.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. +--> + +<configuration supports_final="true"> + + <property> + <name>tez.lib.uris</name> + <value>hdfs:///apps/tez/,hdfs:///apps/tez/lib/,hdfs:///apps/tez/tez.tar.gz</value> + <description>The location of the Tez libraries which will be localized for DAGs</description> + </property> + +</configuration> + http://git-wip-us.apache.org/repos/asf/ambari/blob/21ff3830/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py index e0dc3d8..3c5ec85 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py @@ -85,17 +85,8 @@ class TestHiveServer(RMFTestCase): dest_dir='/apps/tez/', kinnit_if_needed='', hadoop_conf_dir='/etc/hadoop/conf', - hdfs_user='hdfs' - ) - - self.assertResourceCalled('CopyFromLocal', '/usr/lib/tez/tez*.tar.gz', - mode=0755, - owner='tez', - dest_dir='/apps/tez/', - dest_file='tez.tar.gz', - kinnit_if_needed='', - hadoop_conf_dir='/etc/hadoop/conf', - hdfs_user='hdfs' + hdfs_user='hdfs', + dest_file=None ) self.assertResourceCalled('CopyFromLocal', '/usr/lib/tez/lib/*.jar',
