Example usage for org.apache.hadoop.hdfs.server.datanode.fsdataset.impl FsDatasetUtil findMetaFile

List of usage examples for org.apache.hadoop.hdfs.server.datanode.fsdataset.impl FsDatasetUtil findMetaFile

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.server.datanode.fsdataset.impl FsDatasetUtil findMetaFile.

Prototype

public static File findMetaFile(final File blockFile) throws IOException 

Source Link

Document

Find the corresponding meta data file from a given block file

Usage

From source file:com.mellanox.r4h.MiniDFSCluster.java

License:Apache License

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)));
}