本文整理了Java中org.apache.hadoop.hdfs.protocol.Block.metaToBlockFile()
方法的一些代码示例,展示了Block.metaToBlockFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.metaToBlockFile()
方法的具体详情如下:
包路径:org.apache.hadoop.hdfs.protocol.Block
类名称:Block
方法名:metaToBlockFile
暂无
代码示例来源:origin: org.apache.hadoop/hadoop-hdfs
File blockFile = Block.metaToBlockFile(metaFile);
long blockId = Block.filename2id(blockFile.getName());
File targetDir = DatanodeUtil.idToBlockDir(finalizedDir, blockId);
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
File blockFile = Block.metaToBlockFile(metaFile);
long blockId = Block.filename2id(blockFile.getName());
File targetDir = DatanodeUtil.idToBlockDir(finalizedDir, blockId);
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
public static ExtendedBlock getBlock(String bpid, File dataDir) {
List<File> metadataFiles = MiniDFSCluster.getAllBlockMetadataFiles(dataDir);
if (metadataFiles == null || metadataFiles.isEmpty()) {
return null;
}
File metadataFile = metadataFiles.get(0);
File blockFile = Block.metaToBlockFile(metadataFile);
return new ExtendedBlock(bpid, Block.getBlockId(blockFile.getName()),
blockFile.length(), Block.getGenerationStamp(metadataFile.getName()));
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
File blockFile = Block.metaToBlockFile(metaFile);
long blockId = Block.filename2id(blockFile.getName());
File targetDir = DatanodeUtil.idToBlockDir(finalizedDir, blockId);
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
File blockFile = Block.metaToBlockFile(metadataFile);
LOG.info("Deliberately removing file " + blockFile.getName());
assertTrue("Cannot remove file.", blockFile.delete());
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
continue;
for (File metadataFile : metadataFiles) {
File blockFile = Block.metaToBlockFile(metadataFile);
assertTrue("Cannot remove file.", blockFile.delete());
assertTrue("Cannot remove file.", metadataFile.delete());
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
File blockFile = Block.metaToBlockFile(metadataFile);
LOG.info("Deliberately removing file " + blockFile.getName());
assertTrue("Cannot remove file.", blockFile.delete());
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
continue;
for (File metadataFile : metadataFiles) {
File blockFile = Block.metaToBlockFile(metadataFile);
assertTrue("Cannot remove file.", blockFile.delete());
assertTrue("Cannot remove file.", metadataFile.delete());
内容来源于网络,如有侵权,请联系作者删除!