From 6b11a5e94a9531996a808a5528612a4236a3fbf6 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Wed, 17 Oct 2012 01:12:02 +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/branches/branch-2@1399063 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 44a3131c970..76f9aac7568 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -121,6 +121,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);