hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1386863 - in /hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs: ./ src/main/java/org/apache/hadoop/hdfs/qjournal/client/ src/main/java/org/apache/hadoop/hdfs/qjournal/server/ src/main/proto/ src/test/java/org/apache/hadoop/...
Date Mon, 17 Sep 2012 21:51:41 GMT
Author: todd
Date: Mon Sep 17 21:51:40 2012
New Revision: 1386863

URL: http://svn.apache.org/viewvc?rev=1386863&view=rev
Log:
HDFS-3943. QJM: remove currently-unused md5sum field. Contributed by Todd Lipcon.

Modified:
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/SegmentRecoveryComparator.java
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto
    hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestSegmentRecoveryComparator.java

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt?rev=1386863&r1=1386862&r2=1386863&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt
Mon Sep 17 21:51:40 2012
@@ -74,3 +74,5 @@ HDFS-3840. JournalNodes log JournalNotFo
 HDFS-3894. QJM: testRecoverAfterDoubleFailures can be flaky due to IPC client caching (todd)
 
 HDFS-3926. QJM: Add user documentation for QJM. (atm)
+
+HDFS-3943. QJM: remove currently-unused md5sum field (todd)

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/SegmentRecoveryComparator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/SegmentRecoveryComparator.java?rev=1386863&r1=1386862&r2=1386863&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/SegmentRecoveryComparator.java
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/SegmentRecoveryComparator.java
Mon Sep 17 21:51:40 2012
@@ -71,10 +71,8 @@ class SegmentRecoveryComparator
     }
     
     if (!r1Seg.getIsInProgress()) {
-      // If both are finalized, they should match lengths, and be considered
-      // equal
-      if (r1Seg.getEndTxId() != r2Seg.getEndTxId()  ||
-          !r1Seg.getMd5Sum().equals(r2Seg.getMd5Sum())) {
+      // If both are finalized, they should match lengths
+      if (r1Seg.getEndTxId() != r2Seg.getEndTxId()) {
         throw new AssertionError("finalized segs with different lengths: " + 
             r1 + ", " + r2);
       }

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java?rev=1386863&r1=1386862&r2=1386863&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java
Mon Sep 17 21:51:40 2012
@@ -59,7 +59,6 @@ import com.google.common.base.Preconditi
 import com.google.common.base.Stopwatch;
 import com.google.common.collect.Range;
 import com.google.common.collect.Ranges;
-import com.google.protobuf.ByteString;
 import com.google.protobuf.TextFormat;
 
 /**
@@ -628,7 +627,6 @@ class Journal implements Closeable {
         .setStartTxId(segmentTxId)
         .setEndTxId(elf.getLastTxId())
         .setIsInProgress(elf.isInProgress())
-        .setMd5Sum(ByteString.EMPTY) // TODO
         .build();
     LOG.info("getSegmentInfo(" + segmentTxId + "): " + elf + " -> " +
         TextFormat.shortDebugString(ret));
@@ -655,8 +653,7 @@ class Journal implements Closeable {
 
     if (previouslyAccepted != null && !hasFinalizedSegment) {
       SegmentStateProto acceptedState = previouslyAccepted.getSegmentState();
-      assert acceptedState.getEndTxId() == segInfo.getEndTxId() &&
-             acceptedState.getMd5Sum().equals(segInfo.getMd5Sum()) :
+      assert acceptedState.getEndTxId() == segInfo.getEndTxId() :
             "prev accepted: " + TextFormat.shortDebugString(previouslyAccepted)+ "\n" +
             "on disk:       " + TextFormat.shortDebugString(segInfo);
             

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto?rev=1386863&r1=1386862&r2=1386863&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto
Mon Sep 17 21:51:40 2012
@@ -44,7 +44,6 @@ message SegmentStateProto {
   required uint64 startTxId = 1;
   required uint64 endTxId = 2;
   required bool isInProgress = 3;
-  required bytes md5sum = 4;
 }
 
 /**

Modified: hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestSegmentRecoveryComparator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestSegmentRecoveryComparator.java?rev=1386863&r1=1386862&r2=1386863&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestSegmentRecoveryComparator.java
(original)
+++ hadoop/common/branches/HDFS-3077/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestSegmentRecoveryComparator.java
Mon Sep 17 21:51:40 2012
@@ -28,7 +28,6 @@ import org.junit.Test;
 import org.mockito.Mockito;
 
 import com.google.common.collect.Maps;
-import com.google.protobuf.ByteString;
 
 import static org.apache.hadoop.hdfs.qjournal.client.SegmentRecoveryComparator.INSTANCE;
 
@@ -46,7 +45,6 @@ public class TestSegmentRecoveryComparat
           .setSegmentState(SegmentStateProto.newBuilder()
               .setStartTxId(1L)
               .setEndTxId(3L)
-              .setMd5Sum(ByteString.EMPTY)
               .setIsInProgress(true))
           .setLastWriterEpoch(0L)
           .build());
@@ -55,7 +53,6 @@ public class TestSegmentRecoveryComparat
           .setSegmentState(SegmentStateProto.newBuilder()
               .setStartTxId(1L)
               .setEndTxId(4L)
-              .setMd5Sum(ByteString.EMPTY)
               .setIsInProgress(true))
           .setLastWriterEpoch(0L)
           .build());
@@ -64,7 +61,6 @@ public class TestSegmentRecoveryComparat
           .setSegmentState(SegmentStateProto.newBuilder()
               .setStartTxId(1L)
               .setEndTxId(4L)
-              .setMd5Sum(ByteString.EMPTY)
               .setIsInProgress(true))
           .setLastWriterEpoch(0L)
           .setAcceptedInEpoch(1L)
@@ -75,7 +71,6 @@ public class TestSegmentRecoveryComparat
           .setSegmentState(SegmentStateProto.newBuilder()
               .setStartTxId(1L)
               .setEndTxId(3L)
-              .setMd5Sum(ByteString.EMPTY)
               .setIsInProgress(false))
           .setLastWriterEpoch(0L)
           .build());



Mime
View raw message