hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r584044 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
Date Fri, 12 Oct 2007 04:52:32 GMT
Author: nigel
Date: Thu Oct 11 21:52:30 2007
New Revision: 584044

URL: http://svn.apache.org/viewvc?rev=584044&view=rev
Log:
HADOOP-2036. Fix a NullPointerException in JvmMetrics class. Contributed by Nigel.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=584044&r1=584043&r2=584044&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Oct 11 21:52:30 2007
@@ -284,6 +284,8 @@
     HADOOP-2023. Disable TestLocalDirAllocator on Windows.
     (Hairong Kuang via nigel)
 
+    HADOOP-2036. Fix a NullPointerException in JvmMetrics class. (nigel)
+
   IMPROVEMENTS
 
     HADOOP-1908. Restructure data node code so that block sending and 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java?rev=584044&r1=584043&r2=584044&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java Thu Oct 11
21:52:30 2007
@@ -126,6 +126,8 @@
         int threadsTerminated = 0;
         
         for (ThreadInfo threadInfo : threadInfos) {
+            // threadInfo is null if the thread is not alive or doesn't exist
+            if (threadInfo == null) continue;
             Thread.State state = threadInfo.getThreadState();
             if (state == NEW) {
                 threadsNew++;



Mime
View raw message