} else { target.removePendingBlock(pendingBlock);
IOUtils.closeSocket(sock); proxySource.removePendingBlock(this); target.getDDatanode().removePendingBlock(this);
public void executePendingMove(final PendingMove p) { // move the reportedBlock final DDatanode targetDn = p.target.getDDatanode(); ExecutorService moveExecutor = targetDn.getMoveExecutor(); if (moveExecutor == null) { final int nThreads = moverThreadAllocator.allocate(); if (nThreads > 0) { moveExecutor = targetDn.initMoveExecutor(nThreads); } } if (moveExecutor == null) { LOG.warn("No mover threads available: skip moving " + p); targetDn.removePendingBlock(p); p.proxySource.removePendingBlock(p); return; } moveExecutor.execute(new Runnable() { @Override public void run() { p.dispatch(); } }); }
IOUtils.closeSocket(sock); proxySource.removePendingBlock(this); target.getDDatanode().removePendingBlock(this);
IOUtils.closeSocket(sock); proxySource.removePendingBlock(this); target.getDDatanode().removePendingBlock(this);
} else { target.removePendingBlock(pendingBlock);
} else { target.removePendingBlock(pendingBlock);
public void executePendingMove(final PendingMove p) { // move the block final DDatanode targetDn = p.target.getDDatanode(); ExecutorService moveExecutor = targetDn.getMoveExecutor(); if (moveExecutor == null) { final int nThreads = moverThreadAllocator.allocate(); if (nThreads > 0) { moveExecutor = targetDn.initMoveExecutor(nThreads); } } if (moveExecutor == null) { LOG.warn("No mover threads available: skip moving " + p); targetDn.removePendingBlock(p); p.proxySource.removePendingBlock(p); return; } moveExecutor.execute(new Runnable() { @Override public void run() { p.dispatch(); } }); }
public void executePendingMove(final PendingMove p) { // move the block final DDatanode targetDn = p.target.getDDatanode(); ExecutorService moveExecutor = targetDn.getMoveExecutor(); if (moveExecutor == null) { final int nThreads = moverThreadAllocator.allocate(); if (nThreads > 0) { moveExecutor = targetDn.initMoveExecutor(nThreads); } } if (moveExecutor == null) { LOG.warn("No mover threads available: skip moving " + p); targetDn.removePendingBlock(p); p.proxySource.removePendingBlock(p); return; } moveExecutor.execute(new Runnable() { @Override public void run() { p.dispatch(); } }); }
private PendingMove addPendingMove(DBlock block, final PendingMove pm) { if (getDDatanode().addPendingBlock(pm)) { if (pm.markMovedIfGoodBlock(block, getStorageType())) { incScheduledSize(pm.block.getNumBytes()); return pm; } else { getDDatanode().removePendingBlock(pm); } } return null; }
private PendingMove addPendingMove(DBlock block, final PendingMove pm) { if (getDDatanode().addPendingBlock(pm)) { if (pm.markMovedIfGoodBlock(block, getStorageType())) { incScheduledSize(pm.block.getNumBytes()); return pm; } else { getDDatanode().removePendingBlock(pm); } } return null; }
private PendingMove addPendingMove(DBlock block, final PendingMove pm) { if (getDDatanode().addPendingBlock(pm)) { if (pm.markMovedIfGoodBlock(block, getStorageType())) { incScheduledSize(pm.reportedBlock.getNumBytes()); return pm; } else { getDDatanode().removePendingBlock(pm); } } return null; }