managed/src/main/java/com/yugabyte/yw/common/PlacementInfoUtil.java
// Compute the master addresses of the pods in the deployment if multiAZ.
Compute the master addresses of the pods in the deployment if multiAZ.
Compute the master addresses of the pods in the deployment if multiAZ .
public static String computeMasterAddresses(PlacementInfo pi, Map<UUID, Integer> azToNumMasters,
                                              String nodePrefix, Provider provider) {
    List<String> masters = new ArrayList<String>();
    Map<UUID, String> azToDomain = getDomainPerAZ(pi);
    if (!isMultiAZ(provider)) {
      return null;
    }
    for (Entry<UUID, Integer> entry : azToNumMasters.entrySet()) {
      AvailabilityZone az = AvailabilityZone.get(entry.getKey());
      String domain = azToDomain.get(entry.getKey());
      for (int idx = 0; idx < entry.getValue(); idx++) {
        int port = 7100;
        String master = String.format("yb-master-%d.yb-masters.%s-%s.%s:%d", idx, nodePrefix, az.code,
            domain, port);
        masters.add(master);
      }
    }
    return String.join(",", masters);
  }
public static String computeMasterAddresses ( PlacementInfo pi , Map < UUID , Integer > azToNumMasters , String nodePrefix , Provider provider ) { List < String > masters = new ArrayList < String > ( ) ; Map < UUID , String > azToDomain = getDomainPerAZ ( pi ) ; if ( ! isMultiAZ ( provider ) ) { return null ; } for ( Entry < UUID , Integer > entry : azToNumMasters . entrySet ( ) ) { AvailabilityZone az = AvailabilityZone . get ( entry . getKey ( ) ) ; String domain = azToDomain . get ( entry . getKey ( ) ) ; for ( int idx = 0 ; idx < entry . getValue ( ) ; idx ++ ) { int port = 7100 ; String master = String . format ( "yb-master-%d.yb-masters.%s-%s.%s:%d" , idx , nodePrefix , az . code , domain , port ) ; masters . add ( master ) ; } } return String . join ( "," , masters ) ; }
Compute the master addresses of the pods in the deployment if multiAZ.
Compute the master addresses of the pods in the deployment if multiAZ .