AMBARI-21947. Ambari updates database/tables location from intended remote HDFS 
to local HDFS (aonishuk)


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

Branch: refs/heads/branch-2.6
Commit: 536cfc390b4db69d1b656aade0f0bd26d427fbb8
Parents: 2235d6b
Author: Andrew Onishuk <aonis...@hortonworks.com>
Authored: Wed Sep 13 14:27:29 2017 +0300
Committer: Andrew Onishuk <aonis...@hortonworks.com>
Committed: Wed Sep 13 14:27:29 2017 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive_service.py            | 4 ++++
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py            | 3 +++
 .../resources/stacks/HDP/2.0.6/configuration/cluster-env.xml   | 6 ++++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/536cfc39/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index 05b395d..3c42559 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -168,6 +168,10 @@ def validate_connection(target_path_to_jdbc, 
hive_lib_path):
 def check_fs_root(conf_dir, execution_path):
   import params
 
+  if not params.manage_hive_fsroot:
+    Logger.info("Skipping fs root check as cluster-env/manage_hive_fsroot is 
disabled")
+    return
+
   if not params.fs_root.startswith("hdfs://"):
     Logger.info("Skipping fs root check as fs_root does not start with 
hdfs://")
     return

http://git-wip-us.apache.org/repos/asf/ambari/blob/536cfc39/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 956438e..77e1bed 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
@@ -864,3 +864,6 @@ druid_storage_dir = ""
 if 'druid-common' in config['configurations'] \
         and 'druid.storage.storageDirectory' in 
config['configurations']['druid-common']:
   druid_storage_dir = 
config['configurations']['druid-common']['druid.storage.storageDirectory']
+
+
+manage_hive_fsroot = default('/configurations/cluster-env/manage_hive_fsroot', 
True)

http://git-wip-us.apache.org/repos/asf/ambari/blob/536cfc39/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index eb16778..ed1f30d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -334,4 +334,10 @@ gpgcheck=0</value>
     <description>Flag to turn on when external setup of External Ranger is 
done.</description>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>manage_hive_fsroot</name>
+    <value>true</value>
+    <description>If flag is set to true, ambari will manage fsroot for Hive, 
by setting it to fs.defautlFS of local HDFS</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
 </configuration>

Reply via email to