You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/04/03 02:16:01 UTC
git commit: AMBARI-5335. Change Ambari to not upload Hive jar and to
not set hive.jar.directory. (swagle)
Repository: ambari
Updated Branches:
refs/heads/trunk 9a322e1e6 -> 9764cb95b
AMBARI-5335. Change Ambari to not upload Hive jar and to not set hive.jar.directory. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9764cb95
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9764cb95
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9764cb95
Branch: refs/heads/trunk
Commit: 9764cb95bcd9d66be457a82453ca64583a7c5ee0
Parents: 9a322e1
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed Apr 2 17:03:59 2014 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed Apr 2 17:03:59 2014 -0700
----------------------------------------------------------------------
.../HIVE/package/scripts/hive_server.py | 4 +-
.../HIVE/package/scripts/install_jars.py | 52 --------------------
.../services/HIVE/package/scripts/params.py | 3 --
.../services/HIVE/configuration/hive-site.xml | 9 ----
.../stacks/2.0.6/HIVE/test_hive_server.py | 20 --------
5 files changed, 1 insertion(+), 87 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9764cb95/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_server.py
index 2105a90..28403ca 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_server.py
@@ -21,7 +21,6 @@ limitations under the License.
from resource_management import *
from hive import hive
from hive_service import hive_service
-from install_jars import install_hive_exec_jar
from install_jars import install_tez_jars
class HiveServer(Script):
@@ -41,8 +40,7 @@ class HiveServer(Script):
self.configure(env) # FOR SECURITY
install_tez_jars() # Put tez jars in hdfs
- install_hive_exec_jar() # Put hive exec jar in hdfs
-
+
hive_service( 'hiveserver2',
action = 'start'
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/9764cb95/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 f35f794..c02dd6e 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
@@ -19,61 +19,9 @@ limitations under the License.
"""
from resource_management import *
-
import os
import fnmatch
-def install_hive_exec_jar():
- import params
-
- hdfs_path_prefix = 'hdfs://'
- if params.tez_lib_uris:
- hdfs_path = params.hive_exec_hdfs_path
-
- if hdfs_path.strip().find(hdfs_path_prefix, 0) != -1:
- hdfs_path = hdfs_path.replace(hdfs_path_prefix, '')
- pass
-
- params.HdfsDirectory(hdfs_path,
- action="create",
- owner=params.hive_user,
- mode=0755
- )
-
- if params.security_enabled:
- kinit_if_needed = format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_user};")
- else:
- kinit_if_needed = ""
-
- if kinit_if_needed:
- Execute(kinit_if_needed,
- user=params.tez_user,
- path='/bin'
- )
-
- hive_exec_jar_path = find_hive_exec_jar_path(params.hive_lib)
- if hive_exec_jar_path is None:
- hive_exec_jar_path = params.hive_exec_jar_path
- pass
-
- CopyFromLocal(hive_exec_jar_path,
- mode=0755,
- owner=params.hive_user,
- dest_dir=hdfs_path,
- kinnit_if_needed=kinit_if_needed,
- hdfs_user=params.hdfs_user
- )
- pass
-
-def find_hive_exec_jar_path(hive_lib_dir):
- if os.path.exists(hive_lib_dir) and os.path.isdir(hive_lib_dir):
- for file in os.listdir(hive_lib_dir):
- file_path = os.path.join(hive_lib_dir, file)
- if fnmatch.fnmatch(file, 'hive-exec*.jar') and not os.path.islink(file_path):
- return file_path
- pass
- pass
-
def install_tez_jars():
import params
http://git-wip-us.apache.org/repos/asf/ambari/blob/9764cb95/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 52ba5c5..f8f5231 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
@@ -169,9 +169,6 @@ tez_local_api_jars = '/usr/lib/tez/tez*.jar'
tez_local_lib_jars = '/usr/lib/tez/lib/*.jar'
tez_user = config['configurations']['global']['tez_user']
-hive_exec_jar_path = '/usr/lib/hive/lib/hive-exec.jar'
-hive_exec_hdfs_path = default('/configurations/hive-site/hive.jar.directory', '/apps/hive/install')
-
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/9764cb95/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
index 2d8a86d..e28a4f2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
@@ -382,15 +382,6 @@ limitations under the License.
</property>
<property>
- <name>hive.jar.directory</name>
- <value>hdfs:///apps/hive/install</value>
- <description>
- This is the location hive in Tez mode will look for to find a site wide
- installed hive instance.
- </description>
- </property>
-
- <property>
<name>hive.server2.tez.default.queues</name>
<value></value>
<description></description>
http://git-wip-us.apache.org/repos/asf/ambari/blob/9764cb95/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 57e6bb8..503418b 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
@@ -114,26 +114,6 @@ class TestHiveServer(RMFTestCase):
hdfs_user='hdfs'
)
- self.assertResourceCalled('HdfsDirectory', '/apps/hive/install',
- security_enabled = False,
- mode = 0755,
- owner = 'hive',
- keytab = UnknownConfigurationMock(),
- conf_dir = '/etc/hadoop/conf',
- hdfs_user = 'hdfs',
- kinit_path_local = '/usr/bin/kinit',
- action = ['create']
- )
-
- self.assertResourceCalled('CopyFromLocal', '/usr/lib/hive/lib/hive-exec.jar',
- mode=0755,
- owner='hive',
- dest_dir='/apps/hive/install',
- kinnit_if_needed='',
- hdfs_user='hdfs'
- )
-
-
self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_hiveserver2_script /var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid /etc/hive/conf.server',
not_if = 'ls /var/run/hive/hive-server.pid >/dev/null 2>&1 && ps `cat /var/run/hive/hive-server.pid` >/dev/null 2>&1',
user = 'hive'