managed/src/main/java/com/yugabyte/yw/common/PlacementInfoUtil.java
// Find a node running tserver only in the given AZ.
Find a node running tserver only in the given AZ.
Find a node running tserver only in the given AZ .
private static NodeDetails findActiveTServerOnlyInAz(Collection<NodeDetails> nodeDetailsSet,
                                                       UUID targetAZUuid) {
    for (NodeDetails node : nodeDetailsSet) {
      if (node.isActive() && !node.isMaster && node.isTserver && node.azUuid.equals(targetAZUuid)) {
        return node;
      }
    }
    return null;
  }
private static NodeDetails findActiveTServerOnlyInAz ( Collection < NodeDetails > nodeDetailsSet , UUID targetAZUuid ) { for ( NodeDetails node : nodeDetailsSet ) { if ( node . isActive ( ) && ! node . isMaster && node . isTserver && node . azUuid . equals ( targetAZUuid ) ) { return node ; } } return null ; }
Find a node running tserver only in the given AZ.
Find a node running tserver only in the given AZ .