From 8e809b8c814834a01e7fdeff08ce64ef69f31817 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Fri, 28 Feb 2014 19:45:37 +0000 Subject: [PATCH] HDFS-6033. PBImageXmlWriter incorrectly handles processing cache directives. Contributed by Aaron T. Myers. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1573050 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/tools/offlineImageViewer/PBImageXmlWriter.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 5201a9db0a..97afe23160 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -505,6 +505,9 @@ Release 2.4.0 - UNRELEASED HDFS-5339. WebHDFS URI does not accept logical nameservices when security is enabled. (Haohui Mai via jing9) + HDFS-6033. PBImageXmlWriter incorrectly handles processing cache + directives. (atm) + BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageXmlWriter.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageXmlWriter.java index 041f6161e6..99617b805e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageXmlWriter.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageXmlWriter.java @@ -157,7 +157,7 @@ private void dumpCacheManagerSection(InputStream is) throws IOException { .o("maxRelativeExpiry", p.getMaxRelativeExpiry()); out.print("\n"); } - for (int i = 0; i < s.getNumPools(); ++i) { + for (int i = 0; i < s.getNumDirectives(); ++i) { CacheDirectiveInfoProto p = CacheDirectiveInfoProto .parseDelimitedFrom(is); out.print("");