public static JSONObject getJsonDataNode(String hostname, int port, int sslPort, int http2Port, long rackId, long xid,
      JSONArray disks, HardwareState hardwareState) throws JSONException {
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("hostname", hostname);
    jsonObject.put("port", port);
    jsonObject.put("sslport", sslPort);
    jsonObject.put("http2port", http2Port);
    jsonObject.put("rackId", Long.toString(rackId));
    jsonObject.put("xid", xid);
    jsonObject.put("hardwareState", hardwareState.name());
    jsonObject.put("disks", disks);
    return jsonObject;
  }
Generate a JSON data node object with a defined {@code rackId}.

@param hostname the hostname for the node
@param port the plaintext port number for the node
@param sslPort the ssl port number for the node
@param http2Port the http2 port number for the node
@param rackId the rack ID for the node
@param xid the xid for the node
@param disks an array of disks belonging to the node
@param hardwareState A {@link HardwareState} value for the node
@return a {@link JSONObject) representing the node with the properties passed into the function
@throws JSONException
ambry-clustermap/src/test/java/com/github/ambry/clustermap/TestUtils.java