public static JSONObject getJsonReplica(Disk disk) throws JSONException {
    return getJsonReplica(disk.getDataNode().getHostname(), disk.getDataNode().getPort(), disk.getMountPath());
  }
Generates an array of JSON data node objects.
The nodes at even indices in the array will have unique, defined rack IDs, while the ones
at odd indices will have undefined rack IDs.
Increments basePort and sslPort for each node to ensure unique DataNode given same hostname.

@param dataNodeCount how many data nodes to generate
@param hostname the hostname for each node in the array
@param basePort the starting standard port number for nodes generated
@param sslPort the starting SSL port number for nodes generated
@param http2Port the starting HTTP2 port number for nodes generated
@param disks a {@link JSONArray} of disks for each node
@param hardwareState a {@link HardwareLayout} value for each node
@return a {@link JSONArray} of nodes
@throws JSONException
ambry-clustermap/src/test/java/com/github/ambry/clustermap/TestUtils.java