From 46d37a65cf09c2714b4c0c4ec0399031d60027a5 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Mon, 27 Mar 2017 05:23:45 -0700 Subject: [PATCH] HDFS-10506. Addendum patch to include missing changes. Contributed by Akira Ajisaka. --- .../tools/offlineImageViewer/OfflineImageReconstructor.java | 2 +- .../hdfs/tools/offlineImageViewer/PBImageXmlWriter.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java index d10b924682..2b5a19f486 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java @@ -669,7 +669,7 @@ private HdfsProtos.BlockProto.Builder createBlockBuilder(Node block) throw new IOException(" found without "); } blockBld.setBlockId(id); - Long genstamp = block.removeChildLong(INODE_SECTION_GEMSTAMP); + Long genstamp = block.removeChildLong(INODE_SECTION_GENSTAMP); if (genstamp == null) { throw new IOException(" found without "); } 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 5a42a6b7b0..681ebf6862 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 @@ -119,7 +119,7 @@ public final class PBImageXmlWriter { public static final String INODE_SECTION_PERMISSION = "permission"; public static final String INODE_SECTION_BLOCKS = "blocks"; public static final String INODE_SECTION_BLOCK = "block"; - public static final String INODE_SECTION_GEMSTAMP = "genstamp"; + public static final String INODE_SECTION_GENSTAMP = "genstamp"; public static final String INODE_SECTION_NUM_BYTES = "numBytes"; public static final String INODE_SECTION_FILE_UNDER_CONSTRUCTION = "file-under-construction"; @@ -492,7 +492,7 @@ private void dumpINodeFile(INodeSection.INodeFile f) { for (BlockProto b : f.getBlocksList()) { out.print("<" + INODE_SECTION_BLOCK + ">"); o(SECTION_ID, b.getBlockId()) - .o(INODE_SECTION_GEMSTAMP, b.getGenStamp()) + .o(INODE_SECTION_GENSTAMP, b.getGenStamp()) .o(INODE_SECTION_NUM_BYTES, b.getNumBytes()); out.print("\n"); } @@ -685,7 +685,7 @@ private void dumpSnapshotDiffSection(InputStream in) throws IOException { for (BlockProto b : f.getBlocksList()) { out.print("<" + INODE_SECTION_BLOCK + ">"); o(SECTION_ID, b.getBlockId()) - .o(INODE_SECTION_GEMSTAMP, b.getGenStamp()) + .o(INODE_SECTION_GENSTAMP, b.getGenStamp()) .o(INODE_SECTION_NUM_BYTES, b.getNumBytes()); out.print("\n"); }