@Override
  public void addInstance(String clusterName, InstanceConfig instanceConfig) {
    instanceNameToInstanceConfigs.put(instanceConfig.getInstanceName(), instanceConfig);
    upInstances.add(instanceConfig.getInstanceName());
    Map<String, Map<String, String>> diskInfos = instanceConfig.getRecord().getMapFields();
    totalDiskCount += diskInfos.size();
    for (Map<String, String> diskInfo : diskInfos.values()) {
      totalDiskCapacity += Long.parseLong(diskInfo.get(ClusterMapUtils.DISK_CAPACITY_STR));
    }
  }
Get the instances that have replicas for the given partition.
@param partition the partition name of the partition.
@return the set of instances that have replicas for this partition.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/MockHelixAdmin.java