private void updateNeededReplicationQueue ( BlockInfo blockInfo , int delta , int numCurrentReplicas , int numCurrentDecommissionedReplicas , DatanodeDescriptor node , short fileReplication ) { int numOldReplicas = numCurrentReplicas ; int numOldDecommissionedReplicas = numCurrentDecommissionedReplicas ; if ( node . isDecommissioned ( ) || node . isDecommissionInProgress ( ) ) { numOldDecommissionedReplicas -= delta ; } else { numOldReplicas -= delta ; } if ( fileReplication > numOldReplicas ) { neededReplications . remove ( blockInfo , numOldReplicas , numOldDecommissionedReplicas , fileReplication ) ; } if ( fileReplication > numCurrentReplicas ) { neededReplications . add ( blockInfo , numCurrentReplicas , numCurrentDecommissionedReplicas , fileReplication ) ; } }
Update a block s priority queue in neededReplicaiton queues