You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Sandy Ryza (JIRA)" <ji...@apache.org> on 2013/10/25 02:44:01 UTC
[jira] [Commented] (YARN-1351) Invalid string format in Fair
Scheduler log warn message
[ https://issues.apache.org/jira/browse/YARN-1351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804865#comment-13804865 ]
Sandy Ryza commented on YARN-1351:
----------------------------------
Thanks for finding and working on this [~konnew88]! Can you upload the patch as an attachment and then hit "Submit Patch" so that jenkins will run on it?
> Invalid string format in Fair Scheduler log warn message
> --------------------------------------------------------
>
> Key: YARN-1351
> URL: https://issues.apache.org/jira/browse/YARN-1351
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Reporter: Konstantin Weitz
>
> While trying to print a warning, two values of the wrong type (Resource instead of int) are passed into a String.format method call, leading to a runtime exception, in the file:
> _trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java_.
> The warning was intended to be printed whenever the resources don't fit into each other, either because the number of virtual cores or the memory is too small. I changed the %d's into %s, this way the warning will contain both the cores and the memory.
> Following the patch that fixes the issue:
> Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java
> ===================================================================
> --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java (revision 1535589)
> +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java (working copy)
> @@ -471,7 +471,7 @@
> if (maxQueueResources.containsKey(queueName) && minQueueResources.containsKey(queueName)
> && !Resources.fitsIn(minQueueResources.get(queueName),
> maxQueueResources.get(queueName))) {
> - LOG.warn(String.format("Queue %s has max resources %d less than min resources %d",
> + LOG.warn(String.format("Queue %s has max resources %s less than min resources %s",
> queueName, maxQueueResources.get(queueName), minQueueResources.get(queueName)));
> }
> }
--
This message was sent by Atlassian JIRA
(v6.1#6144)