[java]
void getVolumeMap(HashMap<Block, DatanodeBlockInfo> volumeMap, FSVolume volume) { if (children != null) { for (int i = 0; i < children.length; i++) { children[i].getVolumeMap(volumeMap, volume); } } File blockFiles[] = dir.listFiles(); for (int i = 0; i < blockFiles.length; i++) { if (Block.isBlockFilename(blockFiles[i])) { long genStamp = getGenerationStampFromFile(blockFiles, blockFiles[i]); Block _block= new Block(blockFiles[i], blockFiles[i].length(), genStamp); volumeMap.put(_block, new DatanodeBlockInfo(volume, blockFiles[i])); } } }DataNode节点的数据块管理(5)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/37c5b2eab7a6bb578b9a621809ec70bf.html