From 402836479f586d8b2756b30e63a164b341c84489 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Wed, 17 Oct 2012 01:10:55 +0000 Subject: [PATCH] HDFS-3997. OfflineImageViewer incorrectly passes value of imageVersion when visiting IS_COMPRESSED element. Contributed by Mithun Radhakrishnan. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1399062 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 05c6933262f..4acb04e730f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -458,6 +458,9 @@ Release 2.0.3-alpha - Unreleased HDFS-4061. TestBalancer and TestUnderReplicatedBlocks need timeouts. (eli) + HDFS-3997. OfflineImageViewer incorrectly passes value of imageVersion when + visiting IS_COMPRESSED element. (Mithun Radhakrishnan via atm) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java index 0c8ac6353cd..b4ee16b5088 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java @@ -165,7 +165,7 @@ class ImageLoaderCurrent implements ImageLoader { if (LayoutVersion.supports(Feature.FSIMAGE_COMPRESSION, imageVersion)) { boolean isCompressed = in.readBoolean(); - v.visit(ImageElement.IS_COMPRESSED, imageVersion); + v.visit(ImageElement.IS_COMPRESSED, String.valueOf(isCompressed)); if (isCompressed) { String codecClassName = Text.readString(in); v.visit(ImageElement.COMPRESS_CODEC, codecClassName);