[ 
https://issues.apache.org/jira/browse/HADOOP-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nigel Daley updated HADOOP-2036:
--------------------------------

    Attachment: 2036.patch

The ThreadMXBean.getThreadInfo method states that elements of the returned 
array may be null if the thread is no longer alive or doesn't exist.  The 
attached patch checks for this state.

> NPE in JvmMetrics.doThreadUpdates
> ---------------------------------
>
>                 Key: HADOOP-2036
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2036
>             Project: Hadoop
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.14.1
>            Reporter: Koji Noguchi
>            Priority: Blocker
>             Fix For: 0.15.0
>
>         Attachments: 2036.patch
>
>
> It showed on task's stderr.  Didn't fail the task directly.
> java.lang.NullPointerException
> at 
> org.apache.hadoop.metrics.jvm.JvmMetrics.doThreadUpdates(JvmMetrics.java:129)
> at org.apache.hadoop.metrics.jvm.JvmMetrics.doUpdates(JvmMetrics.java:79)
> at 
> org.apache.hadoop.metrics.spi.AbstractMetricsContext.timerEvent(AbstractMetricsContext.java:284)
> at 
> org.apache.hadoop.metrics.spi.AbstractMetricsContext.access$000(AbstractMetricsContext.java:50)
> at 
> org.apache.hadoop.metrics.spi.AbstractMetricsContext$1.run(AbstractMetricsContext.java:249)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to