[19/50] [abbrv] ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-19 Thread aonishuk
AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/branch-3.0-perf
Commit: 43fb59761595431b2a8832bafe1bfcb2fa85a1fa
Parents: 8c017c1
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:43:51 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../2.1.0.3.0/package/scripts/hive_interactive.py   | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 3 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
+ 

[06/50] ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-17 Thread lpuskas
AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 43fb59761595431b2a8832bafe1bfcb2fa85a1fa
Parents: 8c017c1
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:43:51 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../2.1.0.3.0/package/scripts/hive_interactive.py   | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 3 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
+ 

[32/50] ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-17 Thread amagyar
AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 43fb59761595431b2a8832bafe1bfcb2fa85a1fa
Parents: 8c017c1
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:43:51 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../2.1.0.3.0/package/scripts/hive_interactive.py   | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 3 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
+ 

[06/15] ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-16 Thread rlevas
AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 43fb59761595431b2a8832bafe1bfcb2fa85a1fa
Parents: 8c017c1
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:43:51 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../2.1.0.3.0/package/scripts/hive_interactive.py   | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 3 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
+ 

ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-14 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/trunk 8c017c1fd -> 43fb59761


AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/trunk
Commit: 43fb59761595431b2a8832bafe1bfcb2fa85a1fa
Parents: 8c017c1
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:43:51 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../2.1.0.3.0/package/scripts/hive_interactive.py   | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 3 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
index 2ed3e3a..89060be 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive_interactive.py
@@ -62,6 +62,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/43fb5976/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+

ambari git commit: AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse directory. (stoader)

2017-10-14 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 e325ee5ab -> e386a7a7a


AMBARI-22243. Apache Hive 2 LLAP cluster doesn't have the metastore warehouse 
directory. (stoader)


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

Branch: refs/heads/branch-2.6
Commit: e386a7a7abe4e4f0abedbc3a70337a9e118d6766
Parents: e325ee5
Author: Toader, Sebastian 
Authored: Sat Oct 14 07:45:22 2017 +0200
Committer: Toader, Sebastian 
Committed: Sun Oct 15 07:33:00 2017 +0200

--
 .../0.12.0.2.0/package/scripts/hive_interactive.py  | 13 +
 .../python/stacks/2.5/HIVE/test_hive_server_int.py  | 16 
 2 files changed, 29 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e386a7a7/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 8271abf..73e6da4 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -63,6 +63,19 @@ def hive_interactive(name=None):
   import params
   MB_TO_BYTES = 1048576
 
+  # if warehouse directory is in DFS
+  if not params.whs_dir_protocol or params.whs_dir_protocol == 
urlparse(params.default_fs).scheme:
+# Create Hive Metastore Warehouse Dir
+params.HdfsResource(params.hive_apps_whs_dir,
+type="directory",
+action="create_on_execute",
+owner=params.hive_user,
+group=params.user_group,
+mode=params.hive_apps_whs_mode
+)
+  else:
+Logger.info(format("Not creating warehouse directory 
'{hive_apps_whs_dir}', as the location is not in DFS."))
+
   # Create Hive User Dir
   params.HdfsResource(params.hive_hdfs_user_dir,
   type="directory",

http://git-wip-us.apache.org/repos/asf/ambari/blob/e386a7a7/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 3dc78ab..4951c7e 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -418,6 +418,22 @@ class TestHiveServerInteractive(RMFTestCase):
 
   def assert_configure_default(self, no_tmp=False, 
default_fs_default=u'hdfs://c6401.ambari.apache.org:8020', 
with_cs_enabled=False):
 
+self.assertResourceCalled('HdfsResource', '/apps/hive/warehouse',
+  immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
+  security_enabled = False,
+  hadoop_bin_dir = 
'/usr/hdp/current/hadoop-client/bin',
+  keytab = UnknownConfigurationMock(),
+  kinit_path_local = '/usr/bin/kinit',
+  user = 'hdfs',
+  dfs_type = '',
+  owner = 'hive',
+  group = 'hadoop',
+  hadoop_conf_dir = 
'/usr/hdp/current/hadoop-client/conf',
+  type = 'directory',
+  action = ['create_on_execute'], 
hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', 
hdfs_site=self.getConfig()['configurations']['hdfs-site'], 
principal_name='missing_principal', default_fs=default_fs_default,
+  mode = 0777,
+)
+
 self.assertResourceCalled('HdfsResource', '/user/hive',
   immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
   security_enabled = False,