public static JSONObject getJsonDataNode(String hostname, int port, int sslPort, int http2Port,
      HardwareState hardwareState, JSONArray disks) throws JSONException {
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("hostname", hostname);
    jsonObject.put("port", port);
    jsonObject.put("sslport", sslPort);
    jsonObject.put("http2port", http2Port);
    jsonObject.put("xid", DEFAULT_XID);
    jsonObject.put("hardwareState", hardwareState.name());
    jsonObject.put("disks", disks);
    return jsonObject;
  }
Resource state associated with datanode, disk and replica.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/TestUtils.java