code: synchronized void update(BlockInfo blockInfo, int curReplicas, 
                             int decommissionedReplicas,
                             int curExpectedReplicas,
                             int curReplicasDelta, int expectedReplicasDelta) {
      int oldReplicas = curReplicas-curReplicasDelta;
      int oldExpectedReplicas = curExpectedReplicas-expectedReplicasDelta;
      int curPri = getPriority(blockInfo, curReplicas, decommissionedReplicas, curExpectedReplicas);
      int oldPri = getPriority(blockInfo, oldReplicas, decommissionedReplicas, oldExpectedReplicas);
      if(NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug("UnderReplicationBlocks.update " + 
                                      blockInfo +
                                      " curReplicas " + curReplicas +
                                      " curExpectedReplicas " + curExpectedReplicas +
                                      " oldReplicas " + oldReplicas +
                                      " oldExpectedReplicas  " + oldExpectedReplicas +
                                      " curPri  " + curPri +
                                      " oldPri  " + oldPri);
      }
      if(oldPri != LEVEL && oldPri != curPri) {
        remove(blockInfo, oldPri);
      }
      if(curPri != LEVEL && priorityQueues.get(curPri).add(blockInfo)) {
        if (NameNode.stateChangeLog.isDebugEnabled()) {
          NameNode.stateChangeLog.debug(
                                        "BLOCK* NameSystem.UnderReplicationBlock.update:"
                                        + blockInfo
                                        + " has only "+curReplicas
                                        + " replicas and need " + curExpectedReplicas
                                        + " replicas so is added to neededReplications"
                                        + " at priority level " + curPri);
        }
      }
    }
docs: /* update the priority level of a block