summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt <mmathew@pivotal.io>2016-11-09 13:02:03 -0800
committerMatt <mmathew@pivotal.io>2016-11-09 13:02:03 -0800
commitfb1064bd2c7ad7de22a3e7a13a78490be2959ff3 (patch)
tree0cbe07f3e67d260fc3c4699b72aeca98327e93ef
parent6edba95a319d96ceabe77ea67aa9d81fec35057d (diff)
AMBARI-18837: HAWQ Master fails to start when webhdfs is disabled (mithmatt)
-rw-r--r--ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py6
-rw-r--r--ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py4
2 files changed, 10 insertions, 0 deletions
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 440a3e676c..e2dbd7ba14 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())
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 a483656be6..3b09309d53 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',