hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r516555 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Fri, 09 Mar 2007 21:21:55 GMT
Author: tomwhite
Date: Fri Mar  9 13:21:55 2007
New Revision: 516555

URL: http://svn.apache.org/viewvc?view=rev&rev=516555
Log:
HADOOP-1092.  Fix a NullPointerException in HeartbeatMonitor

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=516555&r1=516554&r2=516555
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Mar  9 13:21:55 2007
@@ -36,6 +36,9 @@
 10. HADOOP-1091.  Fix a NullPointerException in MetricsRecord.
     (David Bowen via tomwhite)
 
+11. HADOOP-1092.  Fix a NullPointerException in HeartbeatMonitor
+    thread. (Hairong Kuang via tomwhite)
+
 Release 0.12.0 - 2007-03-02
 
  1. HADOOP-975.  Separate stdout and stderr from tasks.

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=516555&r1=516554&r2=516555
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Fri Mar  9 13:21:55
2007
@@ -369,7 +369,7 @@
         */
         private int getPriority(Block block, 
                 int curReplicas, int expectedReplicas) {
-            if (curReplicas>=expectedReplicas) {
+            if (curReplicas==0 || curReplicas>=expectedReplicas) {
                 return LEVEL; // no need to replicate
             } else if(curReplicas==1) {
                 return 0; // highest priority
@@ -2502,6 +2502,7 @@
      * that are marked for decommission.
      */
     private int countContainingNodes(Collection<DatanodeDescriptor> nodelist) {
+      if( nodelist == null ) return 0;
       int count = 0;
       for (Iterator<DatanodeDescriptor> it = nodelist.iterator(); 
            it.hasNext(); ) {



Mime
View raw message