endTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; block.setNumBytes(replicaInfo.getNumBytes()); datanode.data.finalizeBlock(block, dirSyncOnFinalize);
datanode.data.finalizeBlock(block, dirSyncOnFinalize);
public Object answer(InvocationOnMock invocation) throws IOException, InterruptedException { Thread.sleep(1000); // Bypass the argument to FsDatasetImpl#finalizeBlock to verify that // the block is not removed, since the volume reference should not // be released at this point. data.finalizeBlock((ExtendedBlock) invocation.getArguments()[0], (boolean) invocation.getArguments()[1]); return null; } }).when(dn.data).finalizeBlock(any(ExtendedBlock.class),
endTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; block.setNumBytes(replicaInfo.getNumBytes()); datanode.data.finalizeBlock(block, dirSyncOnFinalize);
datanode.data.finalizeBlock(block, dirSyncOnFinalize);
return null; }).when(dn.data).finalizeBlock(any(ExtendedBlock.class), Mockito.anyBoolean());
datanode.data.finalizeBlock(block, dirSyncOnFinalize);
endTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; block.setNumBytes(replicaInfo.getNumBytes()); datanode.data.finalizeBlock(block, dirSyncOnFinalize);