Description
From HDFS-12840, we found that the `editsStored` in HDFS tests missing a few operations, i.e., the following operations from DFSTestUtils#runOperations().
// OP_UPDATE_BLOCKS 25 final String updateBlockFile = "/update_blocks"; FSDataOutputStream fout = filesystem.create(new Path(updateBlockFile), true, 4096, (short)1, 4096L); fout.write(1); fout.hflush(); long fileId = ((DFSOutputStream)fout.getWrappedStream()).getFileId(); DFSClient dfsclient = DFSClientAdapter.getDFSClient(filesystem); LocatedBlocks blocks = dfsclient.getNamenode().getBlockLocations(updateBlockFile, 0, Integer.MAX_VALUE); dfsclient.getNamenode().abandonBlock(blocks.get(0).getBlock(), fileId, updateBlockFile, dfsclient.clientName); fout.close();
We should re-generate to edits and related XML to sync with the code.