hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject hadoop git commit: HDFS-9291. Fix TestInterDatanodeProtocol to be FsDataset-agnostic. (lei)
Date Mon, 26 Oct 2015 22:17:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 9850827c2 -> ce02c438f


HDFS-9291. Fix TestInterDatanodeProtocol to be FsDataset-agnostic. (lei)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ce02c438
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ce02c438
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ce02c438

Branch: refs/heads/branch-2
Commit: ce02c438fd64827f02633bd285952886fb31b4aa
Parents: 9850827
Author: Lei Xu <lei@apache.org>
Authored: Mon Oct 26 15:16:09 2015 -0700
Committer: Lei Xu <lei@apache.org>
Committed: Mon Oct 26 15:17:36 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 2 ++
 .../hadoop/hdfs/server/datanode/FsDatasetTestUtils.java       | 7 +++++++
 .../datanode/fsdataset/impl/FsDatasetImplTestUtils.java       | 7 +++++++
 .../datanode/fsdataset/impl/TestInterDatanodeProtocol.java    | 2 +-
 4 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce02c438/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 7d408f7..a28d525 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -740,6 +740,8 @@ Release 2.8.0 - UNRELEASED
     HDFS-9284. fsck command should not print exception trace when file not
     found. (Jagadesh Kiran N via wang)
 
+    HDFS-9291. Fix TestInterDatanodeProtocol to be FsDataset-agnostic. (lei)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce02c438/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java
index 252b285..eb986ff 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java
@@ -192,4 +192,11 @@ public interface FsDatasetTestUtils {
    */
   Replica createReplicaUnderRecovery(ExtendedBlock block, long recoveryId)
       throws IOException;
+
+  /**
+   * Check the stored files / data of a replica.
+   * @param replica a replica object.
+   * @throws IOException
+   */
+  void checkStoredReplica(final Replica replica) throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce02c438/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java
index 3058b54..ed32fae 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java
@@ -285,4 +285,11 @@ public class FsDatasetImplTestUtils implements FsDatasetTestUtils {
       return rur;
     }
   }
+
+  @Override
+  public void checkStoredReplica(Replica replica) throws IOException {
+    Preconditions.checkArgument(replica instanceof ReplicaInfo);
+    ReplicaInfo r = (ReplicaInfo) replica;
+    FsDatasetImpl.checkReplicaFiles(r);
+  }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce02c438/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
index 6cc3d7e..8581807 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
@@ -359,7 +359,7 @@ public class TestInterDatanodeProtocol {
       Assert.assertEquals(ReplicaState.RUR, replica.getState());
 
       //check meta data before update
-      FsDatasetImpl.checkReplicaFiles(replica);
+      cluster.getFsDatasetTestUtils(datanode).checkStoredReplica(replica);
 
       //case "THIS IS NOT SUPPOSED TO HAPPEN"
       //with (block length) != (stored replica's on disk length). 


Mime
View raw message