ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-10049. ambari agent logs show knox master pwd (aonishuk)
Date Thu, 12 Mar 2015 18:07:03 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 7026a3e82 -> a7b10b36f
  refs/heads/trunk 473372c91 -> bdfd5d054


AMBARI-10049. ambari agent logs show knox master pwd (aonishuk)


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

Branch: refs/heads/trunk
Commit: bdfd5d0546263dba215958d96b2b0b7d496f1f23
Parents: 473372c
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Thu Mar 12 20:06:53 2015 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Thu Mar 12 20:06:53 2015 +0200

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/ActionQueue.py |  5 +----
 ambari-agent/src/main/python/ambari_agent/Controller.py  | 11 ++++-------
 .../HIVE/0.12.0.2.0/package/scripts/mysql_users.py       |  1 +
 .../test/python/stacks/2.0.6/HIVE/test_mysql_server.py   |  2 ++
 4 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bdfd5d05/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index b60736d..0979d79 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -93,7 +93,6 @@ class ActionQueue(threading.Thread):
       logger.info("Adding " + command['commandType'] + " for service " + \
                     command['serviceName'] + " of cluster " + \
                     command['clusterName'] + " to the queue.")
-      logger.debug(pprint.pformat(command))
       self.statusCommandQueue.put(command)
 
   def put(self, commands):
@@ -106,7 +105,6 @@ class ActionQueue(threading.Thread):
       logger.info("Adding " + command['commandType'] + " for service " + \
                   command['serviceName'] + " of cluster " + \
                   command['clusterName'] + " to the queue.")
-      logger.debug(pprint.pformat(command))
       if command['commandType'] == self.BACKGROUND_EXECUTION_COMMAND :
         self.backgroundCommandQueue.put(self.createCommandHandle(command))
       else:
@@ -172,9 +170,9 @@ class ActionQueue(threading.Thread):
     return command
 
   def process_command(self, command):
-    logger.debug("Took an element of Queue: " + pprint.pformat(command))
     # make sure we log failures
     commandType = command['commandType']
+    logger.debug("Took an element of Queue (command type = %s)." % commandType)
     try:
       if commandType in [self.EXECUTION_COMMAND, self.BACKGROUND_EXECUTION_COMMAND]:
         self.execute_command(command)
@@ -199,7 +197,6 @@ class ActionQueue(threading.Thread):
               commandId = str(commandId), role=command['role'],
               cluster=clusterName)
     logger.info(message)
-    logger.debug(pprint.pformat(command))
 
     taskId = command['taskId']
     # Preparing 'IN_PROGRESS' report

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdfd5d05/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 6a4ecde..2300b47 100644
--- a/ambari-agent/src/main/python/ambari_agent/Controller.py
+++ b/ambari-agent/src/main/python/ambari_agent/Controller.py
@@ -144,12 +144,12 @@ class Controller(threading.Thread):
           self.repeatRegistration = False
           return ret
 
-        logger.info("Registration Successful (response=%s)", pprint.pformat(ret))
-
         self.responseId = int(ret['responseId'])
+        logger.info("Registration Successful (response id = %s)", self.responseId)
+
         self.isRegistered = True
         if 'statusCommands' in ret.keys():
-          logger.info("Got status commands on registration " + pprint.pformat(ret['statusCommands']))
+          logger.info("Got status commands on registration.")
           self.addToStatusQueue(ret['statusCommands'])
           pass
         else:
@@ -241,10 +241,7 @@ class Controller(threading.Thread):
 
         serverId = int(response['responseId'])
 
-        if logger.isEnabledFor(logging.DEBUG):
-          logger.debug('Heartbeat response (id = %s): %s', serverId, pprint.pformat(response))
-        else:
-          logger.info('Heartbeat response received (id = %s)', serverId)
+        logger.info('Heartbeat response received (id = %s)', serverId)
 
         if 'hasMappedComponents' in response.keys():
           self.hasMappedComponents = response['hasMappedComponents'] is not False

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdfd5d05/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_users.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_users.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_users.py
index 7653fea..c023548 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_users.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_users.py
@@ -40,6 +40,7 @@ def mysql_adduser():
   Execute(cmd,
           tries=3,
           try_sleep=5,
+          logoutput=False,
           path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
   )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdfd5d05/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
index 5f6b751..9ec3b01 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
@@ -145,6 +145,7 @@ class TestMySqlServer(RMFTestCase):
     )
     self.assertResourceCalled('Execute', 'bash -x /tmp/addMysqlUser.sh mysql hive \'!`"\'"\'"\'
1\' c6402.ambari.apache.org',
       path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
+      logoutput = False,
       tries = 3,
       try_sleep = 5
     )
@@ -162,6 +163,7 @@ class TestMySqlServer(RMFTestCase):
     )
     self.assertResourceCalled('Execute', 'bash -x /tmp/addMysqlUser.sh mysql hive \'!`"\'"\'"\'
1\' c6402.ambari.apache.org',
       path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
+      logoutput = False,
       tries = 3,
       try_sleep = 5
     )


Mime
View raw message