public boolean changeGenStampOfBlock(int dnIndex, ExtendedBlock blk, long newGenStamp) throws IOException { File blockFile = getBlockFile(dnIndex, blk); File metaFile = FsDatasetUtil.findMetaFile(blockFile); return metaFile.renameTo(new File(DatanodeUtil.getMetaName( blockFile.getAbsolutePath(), newGenStamp))); }
public static boolean changeGenStampOfBlock(int dnIndex, ExtendedBlock blk, long newGenStamp) throws IOException { File blockFile = getBlockFile(dnIndex, blk); File metaFile = FsDatasetUtil.findMetaFile(blockFile); return metaFile.renameTo(new File(DatanodeUtil.getMetaName( blockFile.getAbsolutePath(), newGenStamp))); }