public static List<String> getRemoteDcFromDbInfo(String dbInfoJsonString, String localDatacenter) {
    List<String> remoteDatacenters = new ArrayList<>();
    JSONArray dbInfo = new JSONArray(dbInfoJsonString);
    for (int i = 0; i < dbInfo.length(); i++) {
      JSONObject entry = dbInfo.getJSONObject(i);
      DbEndpoint dbEndpoint = DbEndpoint.fromJson(entry);
      if (!localDatacenter.equals(dbEndpoint.datacenter)) {
        remoteDatacenters.add(dbEndpoint.datacenter);
      }
    }
    Collections.sort(remoteDatacenters);
    return Collections.unmodifiableList(remoteDatacenters);
  }
Parses DB information JSON string and returns a list of datacenter name.
@param dbInfoJsonString the string containing the MySql DB info.
@param localDatacenter name of the local data center
@return The {@link List} of remote datacenter names with alphabetical order.
ambry-mysql/src/main/java/com/github/ambry/mysql/MySqlUtils.java