Example usage for org.apache.hadoop.hdfs.server.datanode DatanodeUtil getMetaName

List of usage examples for org.apache.hadoop.hdfs.server.datanode DatanodeUtil getMetaName

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.server.datanode DatanodeUtil getMetaName.

Prototype

public static String getMetaName(String blockName, long generationStamp) 

Source Link

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