From 50741cb568d4da30b92d4954928bc3039e583b22 Mon Sep 17 00:00:00 2001 From: Lei Xu Date: Mon, 28 Sep 2015 13:23:19 -0700 Subject: [PATCH] HDFS-9148. Incorrect assert message in TestWriteToReplica#testWriteToTemporary (Tony Wu via Lei (Eddy) Xu) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../server/datanode/fsdataset/impl/TestWriteToReplica.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1d9fa1da31..5e1fd924f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -988,6 +988,9 @@ Release 2.8.0 - UNRELEASED HDFS-9080. Update htrace version to 4.0.1 (cmccabe) + HDFS-9148. Incorrect assert message in TestWriteToReplica#testWriteToTemporary + (Tony Wu via lei) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestWriteToReplica.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestWriteToReplica.java index a77184b831..678654a8f7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestWriteToReplica.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestWriteToReplica.java @@ -517,8 +517,8 @@ private void testWriteToTemporary(FsDatasetImpl dataSet, ExtendedBlock[] blocks) Assert.assertTrue( replicaInfo.getBlockId() == blocks[NON_EXISTENT].getBlockId()); } catch (ReplicaAlreadyExistsException e) { - Assert.fail("createRbw() Should have removed the block with the older " - + "genstamp and replaced it with the newer one: " + blocks[NON_EXISTENT]); + Assert.fail("createTemporary should have allowed the block with newer " + + " generation stamp to be created " + blocks[NON_EXISTENT]); } }