code: void processPendingReplications() {
      BlockInfo[] timedOutItems = pendingReplications.getTimedOutBlocks();
      if (timedOutItems != null) {
        writeLock();
        try {
          for (int i = 0; i < timedOutItems.length; i++) {
            NumberReplicas num = countNodes(timedOutItems[i]);
            neededReplications.add(
              timedOutItems[i], 
              num.liveReplicas(),
              num.decommissionedReplicas(),
              getReplication(timedOutItems[i]));
          }
        } finally {
          writeUnlock();
        }
        /* If we know the target datanodes where the replication timedout,
         * we could invoke decBlocksScheduled() on it. Its ok for now.
         */
      }
    }
docs: If there were any replication requests that timed out, reap them
  and put them back into the neededReplication queue