hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiten...@apache.org
Subject svn commit: r1074770 - in /hadoop/hdfs/branches/HDFS-1052: ./ src/java/org/apache/hadoop/hdfs/server/datanode/ src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/ src/test/unit/org/apache/hadoop/hdfs/server/datanode/
Date Sat, 26 Feb 2011 01:04:06 GMT
Author: jitendra
Date: Sat Feb 26 01:04:05 2011
New Revision: 1074770

URL: http://svn.apache.org/viewvc?rev=1074770&view=rev
Log:
Hdfs Federation: Remove unnecessary TODO:FEDERATION comments.

Modified:
    hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaNotFoundException.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestWriteToReplica.java
    hadoop/hdfs/branches/HDFS-1052/src/test/unit/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java

Modified: hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/CHANGES.txt?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-1052/CHANGES.txt Sat Feb 26 01:04:05 2011
@@ -55,6 +55,9 @@ Trunk (unreleased changes)
     HDFS-1657. Tests that corrupt block files fail due to changed file 
     path in federation. (suresh)
 
+    HDFS-1661. Hdfs Federation: Remove unnecessary TODO:FEDERATION comments.
+    (jitendra)
+
   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=1074770&r1=1074769&r2=1074770&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:04:05 2011
@@ -1805,7 +1805,9 @@ public class DataNode extends Configured
   public static DataNode createDataNode(String args[], Configuration conf,
       SecureResources resources) throws IOException {
     DataNode dn = instantiateDataNode(args, conf, resources);
-    dn.runDatanodeDaemon();
+    if (dn != null) {
+      dn.runDatanodeDaemon();
+    }
     return dn;
   }
 

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
Sat Feb 26 01:04:05 2011
@@ -277,7 +277,6 @@ class DataXceiver extends DataTransferPr
             stage, newGs, minBytesRcvd, maxBytesRcvd,
             client, srcDataNode, datanode);
       } else {
-        // TODO:FEDERATION use ExtendedBlock
         datanode.data.recoverClose(block, newGs, minBytesRcvd);
       }
 
@@ -381,7 +380,6 @@ class DataXceiver extends DataTransferPr
       // the block is finalized in the PacketResponder.
       if (client.length() == 0 || 
           stage == BlockConstructionStage.PIPELINE_CLOSE_RECOVERY) {
-        // TODO:FEDERATION use ExtendedBlock
         datanode.closeBlock(block, DataNode.EMPTY_DEL_HINT);
         LOG.info("Received block " + block + 
                  " src: " + remoteAddress +
@@ -622,7 +620,6 @@ class DataXceiver extends DataTransferPr
           dataXceiverServer.balanceThrottler, -1);
                     
       // notify name node
-      // TODO:FEDERATION use ExtendedBlock
       datanode.notifyNamenodeReceivedBlock(block, sourceID);
 
       LOG.info("Moved block " + block + 

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
Sat Feb 26 01:04:05 2011
@@ -955,7 +955,6 @@ public class FSDataset implements FSCons
   @Override // FSDatasetInterface
   public synchronized Block getStoredBlock(String bpid, long blkid)
       throws IOException {
-    // TODO:FEDERATION use extended block
     File blockfile = findBlockFile(bpid, blkid);
     if (blockfile == null) {
       return null;
@@ -992,7 +991,6 @@ public class FSDataset implements FSCons
 
   @Override // FSDatasetInterface
   public boolean metaFileExists(ExtendedBlock b) throws IOException {
-    // TODO:FEDERATION use ExtendedBlock
     return getMetaFile(b).exists();
   }
   
@@ -1303,7 +1301,6 @@ public class FSDataset implements FSCons
       throw new IOException("The new generation stamp " + newGS + 
           " should be greater than the replica " + b + "'s generation stamp");
     }
-    // TODO:FEDERATION use ExtendedBlock
     ReplicaInfo replicaInfo = getReplicaInfo(b);
     if (replicaInfo == null) {
       throw new ReplicaNotFoundException(
@@ -1443,7 +1440,6 @@ public class FSDataset implements FSCons
       long newGS, long expectedBlockLen) throws IOException {
     DataNode.LOG.info("Recover failed append to " + b);
 
-    // TODO:FEDERATION use ExtendedBlock
     ReplicaInfo replicaInfo = recoverCheck(b, newGS, expectedBlockLen);
 
     // change the replica's state/gs etc.
@@ -2076,8 +2072,7 @@ public class FSDataset implements FSCons
           // Remove the block from volumeMap
           volumeMap.remove(bpid, blockId);
           if (datanode.blockScanner != null) {
-            // TODO:FEDERATION pass the right bpid
-            datanode.blockScanner.deleteBlock("TODO", new Block(blockId));
+            datanode.blockScanner.deleteBlock(bpid, new Block(blockId));
           }
           DataNode.LOG.warn("Removed block " + blockId
               + " from memory with missing block file on the disk");

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaNotFoundException.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaNotFoundException.java?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaNotFoundException.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaNotFoundException.java
Sat Feb 26 01:04:05 2011
@@ -48,11 +48,6 @@ public class ReplicaNotFoundException ex
     super("Replica not found for " + b);
   }
   
-  // TODO:FEDERATION remove this later
-  ReplicaNotFoundException(Block b) {
-    super("Replica not found for " + b);
-  }
-  
   public ReplicaNotFoundException(String msg) {
     super(msg);
   }

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestWriteToReplica.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestWriteToReplica.java?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestWriteToReplica.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestWriteToReplica.java
Sat Feb 26 01:04:05 2011
@@ -30,8 +30,7 @@ import org.junit.Test;
 
 /** Test if FSDataset#append, writeToRbw, and writeToTmp */
 public class TestWriteToReplica {
-  static String bpid;
-  // TODO:FEDERATION make sure bpid is passed righ there
+  static String bpid = "BP-TEST";
   final private static ExtendedBlock[] blocks = new ExtendedBlock[] {
     new ExtendedBlock(bpid, 1, 1, 2001), new ExtendedBlock(bpid, 2, 1, 2002), 
     new ExtendedBlock(bpid, 3, 1, 2003), new ExtendedBlock(bpid, 4, 1, 2004),

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/unit/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/unit/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java?rev=1074770&r1=1074769&r2=1074770&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/unit/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/unit/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java
Sat Feb 26 01:04:05 2011
@@ -70,7 +70,6 @@ public class TestBlockRecovery {
   private DataNode dn;
   private Configuration conf;
   private final static long RECOVERY_ID = 3000L;
-  // TODO:FEDERATION fix pool ID
   private final static String POOL_ID = "BP-TEST";
   private final static long BLOCK_ID = 1000L;
   private final static long GEN_STAMP = 2000L;



Mime
View raw message