AMBARI-18837: HAWQ Master fails to start when webhdfs is disabled (mithmatt)


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

Branch: refs/heads/branch-feature-AMBARI-18634
Commit: f33dd9e3821facb4094966d15c6c8549d5ec95a3
Parents: 3bf40d0
Author: Matt <mmat...@pivotal.io>
Authored: Wed Nov 9 13:01:11 2016 -0800
Committer: Matt <mmat...@pivotal.io>
Committed: Wed Nov 9 13:01:11 2016 -0800

----------------------------------------------------------------------
 .../common-services/HAWQ/2.0.0/package/scripts/params.py       | 6 ++++++
 .../src/test/python/common-services/HAWQ/test_hawqmaster.py    | 4 ++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f33dd9e3/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
index 440a3e6..e2dbd7b 100644
--- 
a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
@@ -20,6 +20,8 @@ import functools
 import hawq_constants
 from resource_management import Script
 from resource_management.core.resources.system import File
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions.default import default
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.resources.xml_config import XmlConfig
@@ -60,6 +62,8 @@ hawq_all_hosts = sorted(set(hawq_master_hosts + 
hawqsegment_hosts))
 # HDFS
 hdfs_site = config['configurations']['hdfs-site']
 default_fs = config['configurations']['core-site']['fs.defaultFS']
+hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
@@ -78,6 +82,8 @@ HdfsResource = functools.partial(HdfsResource,
                                  keytab=hdfs_user_keytab,
                                  kinit_path_local=kinit_path_local,
                                  principal_name=hdfs_principal_name,
+                                 hadoop_bin_dir = hadoop_bin_dir,
+                                 hadoop_conf_dir = hadoop_conf_dir,
                                  hdfs_site=hdfs_site,
                                  default_fs=default_fs,
                                  immutable_paths = get_not_managed_resources())

http://git-wip-us.apache.org/repos/asf/ambari/blob/f33dd9e3/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py 
b/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py
index a483656..3b09309 100644
--- a/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py
+++ b/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py
@@ -78,6 +78,8 @@ class TestHawqMaster(HawqBaseTestCase):
     self.assertResourceCalled('HdfsResource', '/hawq_data',
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
+        hadoop_bin_dir = '/usr/phd/current/hadoop-client/bin',
+        hadoop_conf_dir = '/usr/phd/current/hadoop-client/conf',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         type = 'directory',
         action = ['create_on_execute'],
@@ -95,6 +97,8 @@ class TestHawqMaster(HawqBaseTestCase):
     self.assertResourceCalled('HdfsResource', None,
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
+        hadoop_bin_dir = '/usr/phd/current/hadoop-client/bin',
+        hadoop_conf_dir = '/usr/phd/current/hadoop-client/conf',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         action = ['execute'],
         user = u'hdfs',

Reply via email to