hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r683349 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java
Date Wed, 06 Aug 2008 18:12:28 GMT
Author: cdouglas
Date: Wed Aug  6 11:12:28 2008
New Revision: 683349

URL: http://svn.apache.org/viewvc?rev=683349&view=rev
Log:
HADOOP-3897. Fix a NPE in secondary namenode. Contributed by Lohit Vijayarenu.

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=683349&r1=683348&r2=683349&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Wed Aug  6 11:12:28 2008
@@ -784,6 +784,8 @@
 
     HADOOP-3837. Streaming jobs report progress status. (dhruba)
 
+    HADOOP-3897. Fix a NPE in secondary namenode. (Lohit Vijayarenu via cdouglas)
+
 Release 0.17.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java?rev=683349&r1=683348&r2=683349&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java
(original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/CorruptReplicasMap.java
Wed Aug  6 11:12:28 2008
@@ -60,8 +60,10 @@
                                    "on " + dn.getName() +
                                    " by " + Server.getRemoteIp());
     }
-    NameNode.getNameNodeMetrics().numBlocksCorrupted.set(
+    if (NameNode.getNameNodeMetrics() != null) {
+      NameNode.getNameNodeMetrics().numBlocksCorrupted.set(
         corruptReplicasMap.size());
+    }
   }
 
   /**
@@ -72,8 +74,10 @@
   void removeFromCorruptReplicasMap(Block blk) {
     if (corruptReplicasMap != null) {
       corruptReplicasMap.remove(blk);
-      NameNode.getNameNodeMetrics().numBlocksCorrupted.set(
+      if (NameNode.getNameNodeMetrics() != null) {
+        NameNode.getNameNodeMetrics().numBlocksCorrupted.set(
           corruptReplicasMap.size());
+      }
     }
   }
 



Mime
View raw message