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 "Takashi Ohnishi (JIRA)" <ji...@apache.org> on 2016/01/08 16:22:39 UTC
[jira] [Commented] (YARN-4566) TestMiniYarnClusterNodeUtilization
sometimes fails on trunk
[ https://issues.apache.org/jira/browse/YARN-4566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15089328#comment-15089328 ]
Takashi Ohnishi commented on YARN-4566:
---------------------------------------
The NPE happens at getNodeUtilization:
{code}
213 // Give the heartbeat time to propagate to the RM (max 10 seconds)
214 // We check if the nodeUtilization is up to date
215 for (int i=0; i<100; i++) {
216 for (RMNode ni : rmContext.getRMNodes().values()) {
217 if (ni.getNodeUtilization().equals(nodeUtilization)) {
218 break;
219 }
220 }
221 Thread.sleep(100);
222 }
{code}
Looking the code of NodeResourceMonitorImpl.java, the instance returned by getNodeUtilization keeps changing periodically.
I'm not sure but this seems to be the cause of NPE.
In my environment, this failure disappear by adding a null check of the return value.
I will attache a patch.
> TestMiniYarnClusterNodeUtilization sometimes fails on trunk
> -----------------------------------------------------------
>
> Key: YARN-4566
> URL: https://issues.apache.org/jira/browse/YARN-4566
> Project: Hadoop YARN
> Issue Type: Bug
> Components: test
> Reporter: Takashi Ohnishi
>
> TestMiniYarnClusterNodeUtilization often fails with NPE.
> {code}
> testUpdateNodeUtilization(org.apache.hadoop.yarn.server.TestMiniYarnClusterNodeUtilization) Time elapsed: 3.752 sec <<< ERROR!
> java.lang.NullPointerException: null
> at org.apache.hadoop.yarn.server.TestMiniYarnClusterNodeUtilization.verifySimulatedUtilization(TestMiniYarnClusterNodeUtilization.java:217)
> at org.apache.hadoop.yarn.server.TestMiniYarnClusterNodeUtilization.testUpdateNodeUtilization(TestMiniYarnClusterNodeUtilization.java:116)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)