hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bor...@apache.org
Subject svn commit: r1074774 - in /hadoop/hdfs/branches/HDFS-1052: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Date Sat, 26 Feb 2011 01:34:12 GMT
Author: boryas
Date: Sat Feb 26 01:34:12 2011
New Revision: 1074774

URL: http://svn.apache.org/viewvc?rev=1074774&view=rev
Log:
HDFS-1660. HDFS Federation: Datanode doesn't start with two namenodes

Modified:
    hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java

Modified: hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/CHANGES.txt?rev=1074774&r1=1074773&r2=1074774&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-1052/CHANGES.txt Sat Feb 26 01:34:12 2011
@@ -58,6 +58,9 @@ Trunk (unreleased changes)
     HDFS-1661. Hdfs Federation: Remove unnecessary TODO:FEDERATION comments.
     (jitendra)
 
+    HDFS-1660. HDFS Federation: Datanode doesn't start with two namenodes
+    (boryas)
+
   IMPROVEMENTS
 
     HDFS-1510. Added test-patch.properties required by test-patch.sh (nigel)

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java?rev=1074774&r1=1074773&r2=1074774&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
Sat Feb 26 01:34:12 2011
@@ -1710,9 +1710,13 @@ public class DataNode extends Configured
    */
   void closeBlock(ExtendedBlock block, String delHint) {
     myMetrics.blocksWritten.inc();
-    BPOfferService bpos = nameNodeThreads[0];
-    // TODO:FEDERATION - find the corresponding bp - for now , for compiliation, pick the
first one
-    bpos.notifyNamenodeReceivedBlock(new ExtendedBlock(block), delHint);
+    BPOfferService bpos = bpMapping.get(block.getPoolId());
+    if(bpos != null) {
+      bpos.notifyNamenodeReceivedBlock(block, delHint);
+    } else {
+      LOG.warn("Cannot find BPOfferService for reporting block received for bpid="
+          + block.getPoolId());
+    }
     if (blockScanner != null) {
       blockScanner.addBlock(block);
     }



Mime
View raw message