public BlockInfoUnderConstruction[] getLeaseRecoveryCommand(int maxTransfers) { List<BlockInfoUnderConstruction> blocks = recoverBlocks.poll(maxTransfers); if (blocks == null) return null; return blocks.toArray(new BlockInfoUnderConstruction[blocks.size()]); }
public List<BlockTargetPair> getReplicationCommand(int maxTransfers) { return replicateBlocks.poll(maxTransfers); }