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

Varun Saxena commented on YARN-4330:
------------------------------------

Patch does the following :
1. If node resource monitoring interval or container monitoring interval is <= 
0, considering this is as disabling monitoring. Interval <=0 doesnt make much 
sense anyways. Resource calculator plugin(even the default one) wont be 
required if interval is <=0. Have made changes in relevant classes to take care 
of this change. Also, I have set this config to 0 in MiniYARNCluster. Dummy 
plugin wont be required in this case.
2. In NodeManagerHardwareUtils, we take the memory and CPU from config if 
hardware detection is disabled irrespective of whether resource calculator 
plugin can be created or not . Moved around the code in the class to check for 
the config for disable first and returning value from config if its so. In 
MiniYARNCluster have explicitly set it to false. I dont think hardware 
detection is required for tests. 
3. Catching UnsupportedOperationException and logging it at info. No stack 
trace is printed. For other exceptions, stack trace will be printed(keeping it 
consistent with previous behavior). Maybe stack trace in case of other 
unexpected exceptions may be useful.

> MiniYARNCluster prints multiple  Failed to instantiate default resource 
> calculator warning messages
> ---------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4330
>                 URL: https://issues.apache.org/jira/browse/YARN-4330
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: test, yarn
>    Affects Versions: 2.8.0
>         Environment: OSX, JUnit
>            Reporter: Steve Loughran
>            Assignee: Varun Saxena
>            Priority: Blocker
>         Attachments: YARN-4330.01.patch
>
>
> Whenever I try to start a MiniYARNCluster on Branch-2 (commit #0b61cca), I 
> see multiple stack traces warning me that a resource calculator plugin could 
> not be created
> {code}
> (ResourceCalculatorPlugin.java:getResourceCalculatorPlugin(184)) - 
> java.lang.UnsupportedOperationException: Could not determine OS: Failed to 
> instantiate default resource calculator.
> java.lang.UnsupportedOperationException: Could not determine OS
> {code}
> This is a minicluster. It doesn't need resource calculation. It certainly 
> doesn't need test logs being cluttered with even more stack traces which will 
> only generate false alarms about tests failing. 
> There needs to be a way to turn this off, and the minicluster should have it 
> that way by default.
> Being ruthless and marking as a blocker, because its a fairly major 
> regression for anyone testing with the minicluster.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to