[ 
https://issues.apache.org/jira/browse/YARN-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059292#comment-14059292
 ] 

Sandy Ryza commented on YARN-2274:
----------------------------------

{code}
+    if (--updatesToSkipForDebug < 0) {
+      updatesToSkipForDebug = UPDATE_DEBUG_FREQUENCY;
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Cluster Capacity: " + clusterResource +
+            "  Allocations: " + rootMetrics.getAllocatedResources() +
+            "  Availability: " + Resource.newInstance(
+            rootMetrics.getAvailableMB(),
+            rootMetrics.getAvailableVirtualCores()) +
+            "  Demand: " + rootQueue.getDemand());
+      }
+    }
{code}
Moving the "if (LOG.isDebugEnabled)" to the outside of this chunk would make it 
easier for readers who don't care about what's debug logged to realize they can 
skip this whole segment.  If you're OK with that change, +1 and it can be fixed 
on commit?

> FairScheduler: Add debug information about cluster capacity, availability and 
> reservations
> ------------------------------------------------------------------------------------------
>
>                 Key: YARN-2274
>                 URL: https://issues.apache.org/jira/browse/YARN-2274
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: fairscheduler
>    Affects Versions: 2.4.1
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Trivial
>         Attachments: yarn-2274-1.patch, yarn-2274-2.patch
>
>
> FairScheduler logs have little information on cluster capacity and 
> availability. Need this information to debug production issues. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to