hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r516550 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/Counters.java src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
Date Fri, 09 Mar 2007 20:54:29 GMT
Author: tomwhite
Date: Fri Mar  9 12:54:29 2007
New Revision: 516550

URL: http://svn.apache.org/viewvc?view=rev&rev=516550
Log:
HADOOP-1091.  NPE from Simon in JT stdout. Contributed by David Bowen.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Counters.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=516550&r1=516549&r2=516550
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Mar  9 12:54:29 2007
@@ -33,6 +33,8 @@
  9. HADOOP-1080.  Fix bug in bin/hadoop on Windows when native
     libraries are present.  (ab via cutting)
 
+10. HADOOP-1091.  Fix a NullPointerException in MetricsRecord.
+    (David Bowen via tomwhite)
 
 Release 0.12.0 - 2007-03-02
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Counters.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Counters.java?view=diff&rev=516550&r1=516549&r2=516550
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Counters.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Counters.java Fri Mar  9 12:54:29
2007
@@ -21,13 +21,13 @@
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
-import java.util.SortedMap;
 import java.util.TreeMap;
 
 import org.apache.commons.logging.*;
@@ -174,7 +174,7 @@
    * @return Set of counter names.
    */
   public synchronized Collection<String> getGroupNames() {
-    return counters.keySet();
+    return new ArrayList<String>(counters.keySet());
   }
   
   /**

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java?view=diff&rev=516550&r1=516549&r2=516550
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java Fri
Mar  9 12:54:29 2007
@@ -64,6 +64,9 @@
      * @throws MetricsException if the tagName conflicts with the configuration
      */
     public void setTag(String tagName, String tagValue) {
+        if (tagValue == null) {
+            tagValue = "";
+        }
         tagTable.put(tagName, tagValue);
     }
     



Mime
View raw message