incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1213998 - in /incubator/ambari/trunk/agent/src/main/python/ambari_agent: ActionQueue.py Controller.py FileUtil.py
Date Wed, 14 Dec 2011 00:16:23 GMT
Author: ddas
Date: Wed Dec 14 00:16:23 2011
New Revision: 1213998

URL: http://svn.apache.org/viewvc?rev=1213998&view=rev
Log:
AMBARI-157. Bug fixes

Modified:
    incubator/ambari/trunk/agent/src/main/python/ambari_agent/ActionQueue.py
    incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py
    incubator/ambari/trunk/agent/src/main/python/ambari_agent/FileUtil.py

Modified: incubator/ambari/trunk/agent/src/main/python/ambari_agent/ActionQueue.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/agent/src/main/python/ambari_agent/ActionQueue.py?rev=1213998&r1=1213997&r2=1213998&view=diff
==============================================================================
--- incubator/ambari/trunk/agent/src/main/python/ambari_agent/ActionQueue.py (original)
+++ incubator/ambari/trunk/agent/src/main/python/ambari_agent/ActionQueue.py Wed Dec 14 00:16:23
2011
@@ -59,7 +59,7 @@ class ActionQueue(threading.Thread):
   def put(self, response):
     if 'actions' in response:
       actions = response['actions']
-      print(actions)
+      logger.debug(actions)
       # for the servers, take a diff of what's running, and what the controller
       # asked the agent to start. Kill all those servers that the controller
       # didn't ask us to start
@@ -157,6 +157,7 @@ class ActionQueue(threading.Thread):
 
   # Install and configure action
   def installAndConfigAction(self, action):
+    global installScriptHash
     w = self.writeFileAction(action,self.getInstallFilename(action['id']))
     commandResult = {}
     if w['exitCode']!=0:

Modified: incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py?rev=1213998&r1=1213997&r2=1213998&view=diff
==============================================================================
--- incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py (original)
+++ incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py Wed Dec 14 00:16:23
2011
@@ -74,7 +74,7 @@ class Controller(threading.Thread):
       try:
         if retry==False:
           data = json.dumps(self.heartbeat.build(id))
-          logger.info(data)
+          logger.debug(data)
         req = urllib2.Request(self.url, data, {'Content-Type': 'application/json'})
         f = urllib2.urlopen(req)
         response = f.read()

Modified: incubator/ambari/trunk/agent/src/main/python/ambari_agent/FileUtil.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/agent/src/main/python/ambari_agent/FileUtil.py?rev=1213998&r1=1213997&r2=1213998&view=diff
==============================================================================
--- incubator/ambari/trunk/agent/src/main/python/ambari_agent/FileUtil.py (original)
+++ incubator/ambari/trunk/agent/src/main/python/ambari_agent/FileUtil.py Wed Dec 14 00:16:23
2011
@@ -51,7 +51,7 @@ def getFilePath(action, fileName=""):
   return fullPathName
   
 def appendToFile(data,absolutePath):
-  f = open(absolutePath, 'w')
+  f = open(absolutePath, 'a')
   f.write(data)
   f.close()
 



Mime
View raw message