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(); } }); }
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(); } }); }