From 1de317a945ac99287aa5128b5eede7464b3b0ece Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Sat, 4 Feb 2012 02:24:21 +0000 Subject: [PATCH] MAPREDUCE-3803. Fix broken build of raid contrib due to HDFS-2864. Contributed by Ravi Prakash. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1240441 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/datanode/RaidBlockSender.java | 2 +- .../raid/src/java/org/apache/hadoop/raid/BlockFixer.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 779e008dc9..e44d9c5793 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -683,6 +683,9 @@ Release 0.23.1 - Unreleased MAPREDUCE-3417. Fixed job-access-controls to work with MR AM and JobHistoryServer web-apps. (Jonathan Eagles via vinodkv) + MAPREDUCE-3803. Fix broken build of raid contrib due to HDFS-2864. + (Ravi Prakash via suresh) + Release 0.23.0 - 2011-11-01 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java b/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java index 8cde11d9cd..c1fc998471 100644 --- a/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java +++ b/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java @@ -108,7 +108,7 @@ public RaidBlockSender(ExtendedBlock block, long blockLength, long startOffset, BlockMetadataHeader header = BlockMetadataHeader.readHeader(checksumIn); short version = header.getVersion(); - if (version != FSDataset.METADATA_VERSION) { + if (version != BlockMetadataHeader.VERSION) { LOG.warn("Wrong version (" + version + ") for metadata file for " + block + " ignoring ..."); } diff --git a/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java b/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java index 5759fb0cd7..dabb73564a 100644 --- a/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java +++ b/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java @@ -51,7 +51,7 @@ import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; -import org.apache.hadoop.hdfs.server.datanode.FSDataset; +import org.apache.hadoop.hdfs.server.datanode.BlockMetadataHeader; import org.apache.hadoop.hdfs.server.datanode.RaidBlockSender; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -646,7 +646,7 @@ static DataInputStream computeMetadata(Configuration conf, DataOutputStream mdOut = new DataOutputStream(mdOutBase); // First, write out the version. - mdOut.writeShort(FSDataset.METADATA_VERSION); + mdOut.writeShort(BlockMetadataHeader.VERSION); // Create a summer and write out its header. int bytesPerChecksum = conf.getInt("io.bytes.per.checksum", 512);