managed/src/main/java/com/yugabyte/yw/common/PlacementInfoUtil.java
/**
   * Remove a tserver-only node that belongs to the given AZ from the collection of nodes.
   * @param nodes        the list of nodes from which to choose the victim.
   * @param targetAZUuid AZ in which the node should be present.
   */
Remove a tserver-only node that belongs to the given AZ from the collection of nodes.
@param nodes        the list of nodes from which to choose the victim.
@param targetAZUuid AZ in which the node should be present.
Remove a tserver - only node that belongs to the given AZ from the collection of nodes . @param nodes the list of nodes from which to choose the victim . @param targetAZUuid AZ in which the node should be present .
private static void removeNodeInAZ(Collection<NodeDetails> nodes,
                                     UUID targetAZUuid) {
    Iterator<NodeDetails> nodeIter = nodes.iterator();
    while (nodeIter.hasNext()) {
      NodeDetails currentNode = nodeIter.next();
      if (currentNode.azUuid.equals(targetAZUuid) && !currentNode.isMaster) {
        nodeIter.remove();
        return;
      }
    }
  }
private static void removeNodeInAZ ( Collection < NodeDetails > nodes , UUID targetAZUuid ) { Iterator < NodeDetails > nodeIter = nodes . iterator ( ) ; while ( nodeIter . hasNext ( ) ) { NodeDetails currentNode = nodeIter . next ( ) ; if ( currentNode . azUuid . equals ( targetAZUuid ) && ! currentNode . isMaster ) { nodeIter . remove ( ) ; return ; } } }
Remove a tserver-only node that belongs to the given AZ from the collection of nodes.
Remove a tserver - only node that belongs to the given AZ from the collection of nodes .