hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/InProgressPool.java
public void startReconciliation() {
    List<DatanodeDetails> datanodeDetailsList =
        this.poolManager.getNodes(pool.getPoolName());
    if (datanodeDetailsList.size() == 0) {
      LOG.error("Datanode list for {} is Empty. Pool with no nodes ? ",
          pool.getPoolName());
      this.status = ProgressStatus.Error;
      return;
    }

    nodeProcessed = new AtomicInteger(0);
    containerProcessedCount = new AtomicInteger(0);
    nodeCount = new AtomicInteger(0);
    /*
       Ask each datanode to send us commands.
     */
    SendContainerCommand cmd = SendContainerCommand.newBuilder().build();
    for (DatanodeDetails dd : datanodeDetailsList) {
      NodeState currentState = getNodestate(dd);
      if (currentState == HEALTHY || currentState == STALE) {
        nodeCount.incrementAndGet();
        // Queue commands to all datanodes in this pool to send us container
        // report. Since we ignore dead nodes, it is possible that we would have
        // over replicated the container if the node comes back.
        nodeManager.addDatanodeCommand(dd.getUuid(), cmd);
      }
    }
    this.status = ProgressStatus.InProgress;
    this.getPool().setLastProcessedTime(Time.monotonicNow());
  }
/**
   * Starts the reconciliation process for all the nodes in the pool.
   */
Starts the reconciliation process for all the nodes in the pool.
Starts the reconciliation process for all the nodes in the pool .
public void startReconciliation() {
    List<DatanodeDetails> datanodeDetailsList =
        this.poolManager.getNodes(pool.getPoolName());
    if (datanodeDetailsList.size() == 0) {
      LOG.error("Datanode list for {} is Empty. Pool with no nodes ? ",
          pool.getPoolName());
      this.status = ProgressStatus.Error;
      return;
    }
    nodeProcessed = new AtomicInteger(0);
    containerProcessedCount = new AtomicInteger(0);
    nodeCount = new AtomicInteger(0);
    /*
       Ask each datanode to send us commands.
     */
    SendContainerCommand cmd = SendContainerCommand.newBuilder().build();
    for (DatanodeDetails dd : datanodeDetailsList) {
      NodeState currentState = getNodestate(dd);
      if (currentState == HEALTHY || currentState == STALE) {
        nodeCount.incrementAndGet();
        nodeManager.addDatanodeCommand(dd.getUuid(), cmd);
      }
    }
    this.status = ProgressStatus.InProgress;
    this.getPool().setLastProcessedTime(Time.monotonicNow());
  }
public void startReconciliation ( ) { List < DatanodeDetails > datanodeDetailsList = this . poolManager . getNodes ( pool . getPoolName ( ) ) ; if ( datanodeDetailsList . size ( ) == 0 ) { LOG . error ( "Datanode list for {} is Empty. Pool with no nodes ? " , pool . getPoolName ( ) ) ; this . status = ProgressStatus . Error ; return ; } nodeProcessed = new AtomicInteger ( 0 ) ; containerProcessedCount = new AtomicInteger ( 0 ) ; nodeCount = new AtomicInteger ( 0 ) ; /*
       Ask each datanode to send us commands.
     */ SendContainerCommand cmd = SendContainerCommand . newBuilder ( ) . build ( ) ; for ( DatanodeDetails dd : datanodeDetailsList ) { NodeState currentState = getNodestate ( dd ) ; if ( currentState == HEALTHY || currentState == STALE ) { nodeCount . incrementAndGet ( ) ; nodeManager . addDatanodeCommand ( dd . getUuid ( ) , cmd ) ; } } this . status = ProgressStatus . InProgress ; this . getPool ( ) . setLastProcessedTime ( Time . monotonicNow ( ) ) ; }
Starts the reconciliation process for all the nodes in the pool.
Starts the reconciliation process for all the nodes in the pool .
// Queue commands to all datanodes in this pool to send us container // report. Since we ignore dead nodes, it is possible that we would have // over replicated the container if the node comes back.