Java Code Examples for org.apache.hadoop.hdfs.protocol.Block#METADATA_EXTENSION
The following examples show how to use
org.apache.hadoop.hdfs.protocol.Block#METADATA_EXTENSION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DatanodeUtil.java From hadoop with Apache License 2.0 | 4 votes |
/** * @return the meta name given the block name and generation stamp. */ public static String getMetaName(String blockName, long generationStamp) { return blockName + "_" + generationStamp + Block.METADATA_EXTENSION; }
Example 2
Source File: TestDirectoryScanner.java From hadoop with Apache License 2.0 | 4 votes |
private String getMetaFile(long id) { return Block.BLOCK_FILE_PREFIX + id + "_" + DEFAULT_GEN_STAMP + Block.METADATA_EXTENSION; }
Example 3
Source File: DatanodeUtil.java From big-c with Apache License 2.0 | 4 votes |
/** * @return the meta name given the block name and generation stamp. */ public static String getMetaName(String blockName, long generationStamp) { return blockName + "_" + generationStamp + Block.METADATA_EXTENSION; }
Example 4
Source File: TestDirectoryScanner.java From big-c with Apache License 2.0 | 4 votes |
private String getMetaFile(long id) { return Block.BLOCK_FILE_PREFIX + id + "_" + DEFAULT_GEN_STAMP + Block.METADATA_EXTENSION; }
Example 5
Source File: MiniDFSCluster.java From hadoop with Apache License 2.0 | 2 votes |
/** * Get the latest metadata file correpsonding to a block * @param storageDir storage directory * @param blk the block * @return metadata file corresponding to the block */ public static File getBlockMetadataFile(File storageDir, ExtendedBlock blk) { return new File(DatanodeUtil.idToBlockDir(getFinalizedDir(storageDir, blk.getBlockPoolId()), blk.getBlockId()), blk.getBlockName() + "_" + blk.getGenerationStamp() + Block.METADATA_EXTENSION); }
Example 6
Source File: MiniDFSCluster.java From big-c with Apache License 2.0 | 2 votes |
/** * Get the latest metadata file correpsonding to a block * @param storageDir storage directory * @param blk the block * @return metadata file corresponding to the block */ public static File getBlockMetadataFile(File storageDir, ExtendedBlock blk) { return new File(DatanodeUtil.idToBlockDir(getFinalizedDir(storageDir, blk.getBlockPoolId()), blk.getBlockId()), blk.getBlockName() + "_" + blk.getGenerationStamp() + Block.METADATA_EXTENSION); }