ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [25/53] [abbrv] ambari git commit: AMBARI-22492. A bad WebHDFS request is issued when starting Hive Metastore (amagyar)
Date Fri, 15 Dec 2017 12:52:25 GMT
AMBARI-22492. A bad WebHDFS request is issued when starting Hive Metastore (amagyar)


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

Branch: refs/heads/branch-3.0-perf
Commit: 420385362200f3f5f714db50a20d3af727767513
Parents: 814f5b4
Author: Attila Magyar <amagyar@hortonworks.com>
Authored: Wed Dec 6 22:15:12 2017 +0100
Committer: Attila Magyar <amagyar@hortonworks.com>
Committed: Wed Dec 6 22:15:49 2017 +0100

----------------------------------------------------------------------
 .../libraries/providers/hdfs_resource.py                  |  2 ++
 .../HIVE/0.12.0.2.0/package/scripts/hive.py               |  6 +++---
 .../HIVE/2.1.0.3.0/package/scripts/hive.py                | 10 +++++-----
 3 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/42038536/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index 0c45719..0028e84 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -204,6 +204,8 @@ class WebHDFSUtil:
     depending on if query was successful or not, we can assert this for them
     """
     target = HdfsResourceProvider.parse_path(target)
+    if not target:
+      raise Fail("Target cannot be empty")
 
     url = format("{address}/webhdfs/v1{target}?op={operation}", address=self.address)
     request_args = kwargs

http://git-wip-us.apache.org/repos/asf/ambari/blob/42038536/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index d9cc55f..2d5d703 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -249,7 +249,7 @@ def setup_hiveserver2():
                          group=params.hdfs_user,
                          mode=0777) # Hive expects this dir to be writeable by everyone as
it is used as a temp dir
 
-  if params.hive_repl_cmrootdir is not None:
+  if params.hive_repl_cmrootdir:
     params.HdfsResource(params.hive_repl_cmrootdir,
                         type = "directory",
                         action = "create_on_execute",
@@ -328,7 +328,7 @@ def setup_metastore():
                  create_parents = True,
                  mode=0777)
 
-  if params.hive_repl_cmrootdir is not None:
+  if params.hive_repl_cmrootdir:
     params.HdfsResource(params.hive_repl_cmrootdir,
                         type = "directory",
                         action = "create_on_execute",
@@ -342,7 +342,7 @@ def setup_metastore():
                         owner = params.hive_user,
                         group=params.user_group,
                         mode = 0700)
-  if params.hive_repl_cmrootdir is not None or params.hive_repl_rootdir is not None:
+  if params.hive_repl_cmrootdir or params.hive_repl_rootdir:
     params.HdfsResource(None, action="execute")
 
 def create_metastore_schema():

http://git-wip-us.apache.org/repos/asf/ambari/blob/42038536/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py
index 1724bae..0819f12 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py
@@ -248,14 +248,14 @@ def setup_hiveserver2():
                          group=params.hdfs_user,
                          mode=0777) # Hive expects this dir to be writeable by everyone as
it is used as a temp dir
 
-  if params.hive_repl_cmrootdir is not None:
+  if params.hive_repl_cmrootdir:
     params.HdfsResource(params.hive_repl_cmrootdir,
                         type = "directory",
                         action = "create_on_execute",
                         owner = params.hive_user,
                         group=params.user_group,
                         mode = 01777)
-  if params.hive_repl_rootdir is not None:
+  if params.hive_repl_rootdir:
     params.HdfsResource(params.hive_repl_rootdir,
                         type = "directory",
                         action = "create_on_execute",
@@ -318,21 +318,21 @@ def setup_metastore():
        content=StaticFile('startMetastore.sh')
   )
 
-  if params.hive_repl_cmrootdir is not None:
+  if params.hive_repl_cmrootdir:
     params.HdfsResource(params.hive_repl_cmrootdir,
                         type = "directory",
                         action = "create_on_execute",
                         owner = params.hive_user,
                         group=params.user_group,
                         mode = 01777)
-  if params.hive_repl_rootdir is not None:
+  if params.hive_repl_rootdir:
     params.HdfsResource(params.hive_repl_rootdir,
                         type = "directory",
                         action = "create_on_execute",
                         owner = params.hive_user,
                         group=params.user_group,
                         mode = 0700)
-  if params.hive_repl_cmrootdir is not None or params.hive_repl_rootdir is not None:
+  if params.hive_repl_cmrootdir or params.hive_repl_rootdir:
     params.HdfsResource(None, action="execute")
 
 def create_metastore_schema():


Mime
View raw message