AMBARI-22677. Addendum - Don't call pprint.pformat unnecessarily in Ambari 
agent (amagyar)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 9ea3fa154adb1328000bfb8170ea93b7faa66783
Parents: 4e731d3
Author: Attila Magyar <amag...@hortonworks.com>
Authored: Wed Dec 20 17:34:45 2017 +0100
Committer: Attila Magyar <amag...@hortonworks.com>
Committed: Wed Dec 20 17:34:45 2017 +0100

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/Controller.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ea3fa15/ambari-agent/src/main/python/ambari_agent/Controller.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py 
b/ambari-agent/src/main/python/ambari_agent/Controller.py
index ef50440..e4f148f 100644
--- a/ambari-agent/src/main/python/ambari_agent/Controller.py
+++ b/ambari-agent/src/main/python/ambari_agent/Controller.py
@@ -164,14 +164,12 @@ class Controller(threading.Thread):
     while not self.isRegistered:
       try:
         data = json.dumps(self.register.build(self.version))
-        prettyData = pprint.pformat(data)
-
         try:
           server_ip = socket.gethostbyname(self.hostname)
-          logger.info("Registering with %s (%s) (agent=%s)", self.hostname, 
server_ip, prettyData)
+          logger.info("Registering with %s (%s) (agent=%s)", self.hostname, 
server_ip, data)
         except socket.error:
           logger.warn("Unable to determine the IP address of '%s', agent 
registration may fail (agent=%s)",
-                      self.hostname, prettyData)
+                      self.hostname, data)
 
         ret = self.sendRequest(self.registerUrl, data)
 

Reply via email to