AMBARI-18502: Logging of ambari agent scheduling activities in debug mode 
(Ranjan Banerjee via Nahappan Somasundaram)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 3e4b368f9bde259b29d3a2e97fd84e773af434c3
Parents: 6587fda
Author: Nahappan Somasundaram <nsomasunda...@hortonworks.com>
Authored: Mon Oct 10 20:47:32 2016 -0700
Committer: Nahappan Somasundaram <nsomasunda...@hortonworks.com>
Committed: Mon Oct 10 20:47:32 2016 -0700

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py  | 1 +
 ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py 
b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
index 35460b2..f787a2d 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
@@ -544,6 +544,7 @@ class Scheduler(object):
                 for job in tuple(jobstore.jobs):
                     run_times = job.get_run_times(now)
                     if run_times:
+                        logger.debug('Scheduler submitting job %s to run', 
job.name)
                         self._threadpool.submit(self._run_job, job, run_times)
 
                         # Increase the job's run count

http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
----------------------------------------------------------------------
diff --git 
a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py 
b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
index 6cd7ce2..cb19888 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
@@ -83,6 +83,7 @@ class ThreadPool(object):
                 break
 
             try:
+                logger.debug('Worker thread starting job %s', args[0])
                 func(*args, **kwargs)
             except:
                 logger.exception('Error in worker thread')

Reply via email to