JSONObject toJSONObject() throws JSONException {
    // Effectively serializes the "foreign key" into hardwareLayout to find Disk.
    return new JSONObject().put("hostname", disk.getDataNode().getHostname())
        .put("port", disk.getDataNode().getPort())
        .put("mountPath", disk.getMountPath());
  }
An implementation of {@link ReplicaId} to be used within the {@link StaticClusterManager}.

A Replica is one constituent piece of a {@link Partition}. A Replica is uniquely identifiable by its Partition and
its {@link Disk}. Note that this induces a constraint that a Partition can never have more than one Replica on a
given Disk. This ensures that a Partition does not have Replicas that share fates.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/Replica.java