HDFS-10506. Addendum patch to include missing changes. Contributed by Akira Ajisaka.
This commit is contained in:
parent
96e2ab8144
commit
46d37a65cf
@ -669,7 +669,7 @@ private HdfsProtos.BlockProto.Builder createBlockBuilder(Node block)
|
||||
throw new IOException("<block> found without <id>");
|
||||
}
|
||||
blockBld.setBlockId(id);
|
||||
Long genstamp = block.removeChildLong(INODE_SECTION_GEMSTAMP);
|
||||
Long genstamp = block.removeChildLong(INODE_SECTION_GENSTAMP);
|
||||
if (genstamp == null) {
|
||||
throw new IOException("<block> found without <genstamp>");
|
||||
}
|
||||
|
@ -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("</" + INODE_SECTION_BLOCK + ">\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("</" + INODE_SECTION_BLOCK + ">\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user