private void reportBadBlock(final BPOfferService bpos, final ExtendedBlock block, final String msg) { FsVolumeSpi volume = getFSDataset().getVolume(block); if (volume == null) { LOG.warn("Cannot find FsVolumeSpi to report bad block: " + block); return; } bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); LOG.warn(msg); }
/** * Report a bad block which is hosted on the local DN. * * @param block the bad block which is hosted on the local DN * @param volume the volume that block is stored in and the volume * must not be null * @throws IOException */ public void reportBadBlocks(ExtendedBlock block, FsVolumeSpi volume) throws IOException { BPOfferService bpos = getBPOSForBlock(block); bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); }
private void reportBadBlock(final BPOfferService bpos, final ExtendedBlock block, final String msg) { FsVolumeSpi volume = getFSDataset().getVolume(block); if (volume == null) { LOG.warn("Cannot find FsVolumeSpi to report bad block: " + block); return; } bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); LOG.warn(msg); }
/** * Report a bad block which is hosted on the local DN. * * @param block the bad block which is hosted on the local DN * @param volume the volume that block is stored in and the volume * must not be null * @throws IOException */ public void reportBadBlocks(ExtendedBlock block, FsVolumeSpi volume) throws IOException { BPOfferService bpos = getBPOSForBlock(block); bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); }
/** * Report a bad block which is hosted on the local DN. * * @param block the bad block which is hosted on the local DN * @param volume the volume that block is stored in and the volume * must not be null * @throws IOException */ public void reportBadBlocks(ExtendedBlock block, FsVolumeSpi volume) throws IOException { BPOfferService bpos = getBPOSForBlock(block); bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); }
private void reportBadBlock(final BPOfferService bpos, final ExtendedBlock block, final String msg) { FsVolumeSpi volume = getFSDataset().getVolume(block); if (volume == null) { LOG.warn("Cannot find FsVolumeSpi to report bad block: " + block); return; } bpos.reportBadBlocks( block, volume.getStorageID(), volume.getStorageType()); LOG.warn(msg); }
(Mockito.any(LocatedBlock[].class)); bpos.reportBadBlocks(FAKE_BLOCK, mockFSDataset.getVolume(FAKE_BLOCK) .getStorageID(), mockFSDataset.getVolume(FAKE_BLOCK) .getStorageType());
Mockito.doAnswer(new BPOfferServiceSynchronousCallAnswer(1)) .when(mockNN2).reportBadBlocks(Mockito.any(LocatedBlock[].class)); bpos.reportBadBlocks(FAKE_BLOCK, mockFSDataset.getVolume(FAKE_BLOCK) .getStorageID(), mockFSDataset.getVolume(FAKE_BLOCK) .getStorageType()); bpos.reportBadBlocks(FAKE_BLOCK, mockFSDataset.getVolume(FAKE_BLOCK) .getStorageID(), mockFSDataset.getVolume(FAKE_BLOCK) .getStorageType());