Repository: ambari
Updated Branches:
  refs/heads/trunk 0b7f6a8f4 -> 090d8b532


AMBARI-11096. HiveServer2 Start fails during kerberization (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/090d8b53
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/090d8b53
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/090d8b53

Branch: refs/heads/trunk
Commit: 090d8b53291ed0e011cdab109eb3fa60cefbf7dc
Parents: 0b7f6a8
Author: Andrew Onishuk <[email protected]>
Authored: Wed May 13 12:42:56 2015 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Wed May 13 12:42:56 2015 +0300

----------------------------------------------------------------------
 .../0.12.0.2.0/package/scripts/params_linux.py  |  4 ++--
 .../package/scripts/mapred_service_check.py     |  4 ++++
 .../2.0.6/YARN/test_mapreduce2_service_check.py | 20 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/090d8b53/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 03782d6..c1b6d24 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -113,7 +113,7 @@ if Script.is_hdp_stack_greater_or_equal("2.2"):
   hive_tar_destination = 
config['configurations']['cluster-env']['hive_tar_destination_folder']  + "/" + 
os.path.basename(hive_tar_source)
   pig_tar_destination = 
config['configurations']['cluster-env']['pig_tar_destination_folder'] + "/" + 
os.path.basename(pig_tar_source)
   hadoop_streaming_tar_destination_dir = 
config['configurations']['cluster-env']['hadoop-streaming_tar_destination_folder']
-  sqoop_tar_destination_dir = 
config['configurations']['cluster-env']['sqoop_tar_destination_folder'] + "/" + 
os.path.basename(sqoop_tar_source)
+  sqoop_tar_destination_dir = 
config['configurations']['cluster-env']['sqoop_tar_destination_folder']
   mapreduce_tar_destination = 
config['configurations']['cluster-env']['mapreduce_tar_destination_folder'] + 
"/" + os.path.basename(mapreduce_tar_source)
   tez_tar_destination = 
config['configurations']['cluster-env']['tez_tar_destination_folder'] + "/" + 
os.path.basename(tez_tar_source)
 
@@ -371,7 +371,7 @@ import functools
 #to create hdfs directory we need to call params.HdfsResource in code
 HdfsResource = functools.partial(
  HdfsResource,
-  user = hdfs_principal_name if security_enabled else hdfs_user,
+  user = hdfs_user,
   security_enabled = security_enabled,
   keytab = hdfs_user_keytab,
   kinit_path_local = kinit_path_local,

http://git-wip-us.apache.org/repos/asf/ambari/blob/090d8b53/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
index 35fd71c..f7fafd8 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
@@ -120,6 +120,10 @@ class 
MapReduce2ServiceCheckDefault(MapReduce2ServiceCheck):
     test_cmd = format("fs -test -e {output_file}")
     run_wordcount_job = format("jar {jar_path} wordcount {input_file} 
{output_file}")
 
+    params.HdfsResource(output_file,
+                        action = "delete_on_execute",
+                        type = "directory",
+    )
     params.HdfsResource(input_file,
                         action = "create_on_execute",
                         type = "file",

http://git-wip-us.apache.org/repos/asf/ambari/blob/090d8b53/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
 
b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
index bc91487..6c19bc4 100644
--- 
a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
+++ 
b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
@@ -39,6 +39,16 @@ class TestServiceCheck(RMFTestCase):
                       hdp_stack_version = self.STACK_VERSION,
                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
+    self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mapredsmokeoutput',
+        security_enabled = False,
+        hadoop_bin_dir = '/usr/bin',
+        keytab = UnknownConfigurationMock(),
+        kinit_path_local = '/usr/bin/kinit',
+        user = 'hdfs',
+        action = ['delete_on_execute'],
+        hadoop_conf_dir = '/etc/hadoop/conf',
+        type = 'directory',
+    )
     self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mapredsmokeinput',
         security_enabled = False,
         hadoop_bin_dir = '/usr/bin',
@@ -83,6 +93,16 @@ class TestServiceCheck(RMFTestCase):
                       hdp_stack_version = self.STACK_VERSION,
                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
+    self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mapredsmokeoutput',
+        security_enabled = True,
+        hadoop_bin_dir = '/usr/bin',
+        keytab = '/etc/security/keytabs/hdfs.headless.keytab',
+        kinit_path_local = '/usr/bin/kinit',
+        user = 'hdfs',
+        action = ['delete_on_execute'],
+        hadoop_conf_dir = '/etc/hadoop/conf',
+        type = 'directory',
+    )
     self.assertResourceCalled('HdfsResource', 
'/user/ambari-qa/mapredsmokeinput',
         security_enabled = True,
         hadoop_bin_dir = '/usr/bin',

Reply via email to