hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r757601 - in /hadoop/core/branches/branch-0.20: CHANGES.txt src/test/org/apache/hadoop/hdfs/DataNodeCluster.java src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java
Date Mon, 23 Mar 2009 23:39:41 GMT
Author: szetszwo
Date: Mon Mar 23 23:39:40 2009
New Revision: 757601

URL: http://svn.apache.org/viewvc?rev=757601&view=rev
Log:
HADOOP-5554. DataNodeCluster and CreateEditsLog should create blocks with the same generation
stamp value. (hairong via szetszwo)

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/DataNodeCluster.java
    hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.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=757601&r1=757600&r2=757601&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Mon Mar 23 23:39:40 2009
@@ -849,6 +849,9 @@
     HADOOP-5549. ReplicationMonitor should schedule both replication and
     deletion work in one iteration. (hairong)
 
+    HADOOP-5554. DataNodeCluster and CreateEditsLog should create blocks with
+    the same generation stamp value. (hairong via szetszwo)
+
 Release 0.19.1 - 2009-02-23 
 
   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=757601&r1=757600&r2=757601&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
Mon Mar 23 23:39:40 2009
@@ -28,6 +28,7 @@
 import org.apache.hadoop.hdfs.protocol.Block;
 import org.apache.hadoop.hdfs.server.common.HdfsConstants.StartupOption;
 import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset;
+import org.apache.hadoop.hdfs.server.namenode.CreateEditsLog;
 import org.apache.hadoop.net.DNS;
 
 
@@ -195,7 +196,7 @@
         for (int i_dn = 0; i_dn < numDataNodes; ++i_dn) {
           for (int i = 0; i < blocks.length; ++i) {
             blocks[i] = new Block(blkid++, blockSize,
-                Block.GRANDFATHER_GENERATION_STAMP);
+                CreateEditsLog.BLOCK_GENERATION_STAMP);
           }
           for (int i = 1; i <= replication; ++i) { 
             // inject blocks for dn_i into dn_i and replica in dn_i's neighbors 

Modified: hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java?rev=757601&r1=757600&r2=757601&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java
(original)
+++ hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java
Mon Mar 23 23:39:40 2009
@@ -53,6 +53,8 @@
   static final String BASE_PATH = "/createdViaInjectingInEditsLog";
   static final String EDITS_DIR = "/tmp/EditsLogOut";
   static String edits_dir = EDITS_DIR;
+  static final public long BLOCK_GENERATION_STAMP =
+    GenerationStamp.FIRST_VALID_STAMP;
   
   static void addFiles(FSEditLog editLog, int numFiles, short replication, 
                          int blocksPerFile, long startingBlockId,
@@ -66,7 +68,7 @@
     BlockInfo[] blocks = new BlockInfo[blocksPerFile];
     for (int iB = 0; iB < blocksPerFile; ++iB) {
       blocks[iB] = 
-       new BlockInfo(new Block(0, blockSize, GenerationStamp.FIRST_VALID_STAMP),
+       new BlockInfo(new Block(0, blockSize, BLOCK_GENERATION_STAMP),
                                replication);
     }
     



Mime
View raw message