ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-11378. oozie service check does not complete in 5 minutes and is killed by agent (aonishuk)
Date Mon, 25 May 2015 21:44:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 46b159a2d -> b5a8bd522


AMBARI-11378. oozie service check does not complete in 5 minutes and is killed by agent (aonishuk)


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

Branch: refs/heads/trunk
Commit: b5a8bd52202c9657890061953c604e2bc8bcf17a
Parents: 46b159a
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue May 26 00:44:40 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue May 26 00:44:40 2015 +0300

----------------------------------------------------------------------
 .../libraries/providers/hdfs_resource.py                  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b5a8bd52/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 0f1995c..9f145a8 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
@@ -119,12 +119,11 @@ class HdfsResourceJar:
     env.config['hdfs_files'] = []
 
 class WebHDFSUtil:
-  def __init__(self, address, run_user, logoutput, security_enabled, kinit_function):
+  def __init__(self, address, run_user, logoutput, security_enabled):
     self.address = address
     self.run_user = run_user
     self.logoutput = logoutput
     self.security_enabled = security_enabled
-    self.kinit_function = kinit_function
     
   def parse_path(self, path):
     """
@@ -165,7 +164,6 @@ class WebHDFSUtil:
     if file_to_put:
       cmd += ["-T", file_to_put]
     if self.security_enabled:
-      self.kinit_function()
       cmd += ["--negotiate", "-u", ":"]
       
     cmd.append(url)
@@ -215,12 +213,14 @@ class HdfsResourceWebHDFS:
   def action_delayed(self, action_name, main_resource):
     main_resource.assert_parameter_is_set('user')
     
+    if main_resource.resource.security_enabled:
+      main_resource.kinit()
+    
     address = main_resource.https_nn_address if main_resource.is_https_enabled else main_resource.http_nn_address
     protocol = "https" if main_resource.is_https_enabled else "http"
     
     self.util = WebHDFSUtil(format("{protocol}://{address}"), main_resource.resource.user,

-                            main_resource.resource.logoutput, main_resource.resource.security_enabled,
-                            main_resource.kinit)
+                            main_resource.resource.logoutput, main_resource.resource.security_enabled)
     self.mode = oct(main_resource.resource.mode)[1:] if main_resource.resource.mode else
main_resource.resource.mode
     self.mode_set = False
     self.main_resource = main_resource


Mime
View raw message