소스 검색

AMBARI-10074. WEBHCAT_SERVER can not start on Ubuntu (aonishuk)

Andrew Onishuk 10 년 전
부모
커밋
9c22eafba4

+ 1 - 0
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py

@@ -106,6 +106,7 @@ execute_path = os.environ['PATH'] + os.pathsep + hive_bin + os.pathsep + hadoop_
 hive_metastore_user_name = config['configurations']['hive-site']['javax.jdo.option.ConnectionUserName']
 hive_jdbc_connection_url = config['configurations']['hive-site']['javax.jdo.option.ConnectionURL']
 
+webhcat_conf_dir = status_params.webhcat_conf_dir
 hive_metastore_user_passwd = config['configurations']['hive-site']['javax.jdo.option.ConnectionPassword']
 hive_metastore_db_type = config['configurations']['hive-env']['hive_database_type']
 #HACK Temporarily use dbType=azuredb while invoking schematool

+ 4 - 0
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py

@@ -147,6 +147,10 @@ def webhcat():
        group=params.user_group,
        content=InlineTemplate(params.webhcat_env_sh_template)
   )
+  
+  Directory(params.webhcat_conf_dir,
+       cd_access='a',
+  )
 
   log4j_webhcat_filename = 'webhcat-log4j.properties'
   if (params.log4j_webhcat_props != None):

+ 6 - 0
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py

@@ -212,6 +212,9 @@ class TestWebHCatServer(RMFTestCase):
                               owner = 'hcat',
                               group = 'hadoop',
                               )
+    self.assertResourceCalled('Directory', '/etc/hive-webhcat/conf',
+        cd_access = 'a',
+    )
     self.assertResourceCalled('File', '/etc/hcatalog/conf/webhcat-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hcat',
@@ -320,6 +323,9 @@ class TestWebHCatServer(RMFTestCase):
                               owner = 'hcat',
                               group = 'hadoop',
                               )
+    self.assertResourceCalled('Directory', '/etc/hive-webhcat/conf',
+        cd_access = 'a',
+    )
     self.assertResourceCalled('File', '/etc/hcatalog/conf/webhcat-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hcat',