hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r750240 - in /hadoop/core/branches/branch-0.20: CHANGES.txt src/test/org/apache/hadoop/hdfs/DataNodeCluster.java
Date Wed, 04 Mar 2009 23:55:54 GMT
Author: szetszwo
Date: Wed Mar  4 23:55:53 2009
New Revision: 750240

URL: http://svn.apache.org/viewvc?rev=750240&view=rev
Log:
HADOOP-5384. Fix a problem that DataNodeCluster creates blocks with generationStamp == 1.
 (szetszwo)

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=750240&r1=750239&r2=750240&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Wed Mar  4 23:55:53 2009
@@ -691,6 +691,9 @@
     HADOOP-4638. Fixes job recovery to not crash the job tracker for problems
     with a single job file. (Amar Kamat via yhemanth)
 
+    HADOOP-5384. Fix a problem that DataNodeCluster creates blocks with
+    generationStamp == 1.  (szetszwo)
+
 Release 0.19.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java?rev=750240&r1=750239&r2=750240&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java
(original)
+++ hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java
Wed Mar  4 23:55:53 2009
@@ -24,12 +24,10 @@
 import java.util.Random;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.hdfs.protocol.Block;
-import org.apache.hadoop.hdfs.server.common.HdfsConstants;
 import org.apache.hadoop.hdfs.server.common.HdfsConstants.StartupOption;
 import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.net.DNS;
 
 
@@ -196,7 +194,8 @@
         long blkid = startingBlockId;
         for (int i_dn = 0; i_dn < numDataNodes; ++i_dn) {
           for (int i = 0; i < blocks.length; ++i) {
-            blocks[i] = new Block(blkid++, blockSize, 1);
+            blocks[i] = new Block(blkid++, blockSize,
+                Block.GRANDFATHER_GENERATION_STAMP);
           }
           for (int i = 1; i <= replication; ++i) { 
             // inject blocks for dn_i into dn_i and replica in dn_i's neighbors 



Mime
View raw message