for (DatanodeStorageInfo storage : getStorages(block)) { boolean isCorrupt = true; if (newStorages != null) {
uc.setExpectedLocations(lastBlock, blockManager.getStorages(lastBlock), lastBlock.getBlockType());
"last block of the file is not in blocksMap"; DatanodeStorageInfo[] targets = getStorages(lastBlock);
file.getPreferredBlockReplication()); truncatedBlockUC.convertToBlockUnderConstruction( BlockUCState.UNDER_CONSTRUCTION, blockManager.getStorages(oldBlock)); truncatedBlockUC.setNumBytes(oldBlock.getNumBytes() - lastBlockDelta); truncatedBlockUC.getUnderConstructionFeature().setTruncateBlock(oldBlock);
private void markAllBlocksAsCorrupt(BlockManager bm, ExtendedBlock blk) throws IOException { for (DatanodeStorageInfo info : bm.getStorages(blk.getLocalBlock())) { bm.findAndMarkBlockAsCorrupt( blk, info.getDatanodeDescriptor(), info.getStorageID(), "STORAGE_ID"); } }
for (DatanodeStorageInfo storage : getStorages(block)) { boolean isCorrupt = true; if (newStorages != null) {
for (DatanodeStorageInfo storage : getStorages(block)) { boolean isCorrupt = true; if (newStorages != null) {
uc.setExpectedLocations(blockManager.getStorages(lastBlock));
Iterator<DatanodeStorageInfo> storageInfoIter = cluster.getNamesystem().getBlockManager(). getStorages(block.getLocalBlock()).iterator(); assertTrue(storageInfoIter.hasNext()); DatanodeStorageInfo info = storageInfoIter.next();
"last block of the file is not in blocksMap"; DatanodeStorageInfo[] targets = getStorages(oldBlock);
"last block of the file is not in blocksMap"; DatanodeStorageInfo[] targets = getStorages(oldBlock);
truncatedBlockUC.setNumBytes(oldBlock.getNumBytes() - lastBlockDelta); truncatedBlockUC.setTruncateBlock(oldBlock); file.setLastBlock(truncatedBlockUC, blockManager.getStorages(oldBlock)); getBlockManager().addBlockCollection(truncatedBlockUC, file);
uc.setExpectedLocations(blockManager.getStorages(lastBlock));
truncatedBlockUC.setNumBytes(oldBlock.getNumBytes() - lastBlockDelta); truncatedBlockUC.setTruncateBlock(oldBlock); file.setLastBlock(truncatedBlockUC, blockManager.getStorages(oldBlock)); getBlockManager().addBlockCollection(truncatedBlockUC, file);