@Override
  public JSONObject getSnapshot() {
    JSONObject snapshot = new JSONObject();
    snapshot.put(DISK_NODE, datanode.getHostname() + ":" + datanode.getPort());
    snapshot.put(DISK_MOUNT_PATH, getMountPath());
    snapshot.put(CAPACITY_BYTES, getRawCapacityInBytes());
    String liveness = UP;
    if (datanode.getState() == HardwareState.UNAVAILABLE) {
      liveness = NODE_DOWN;
    } else if (resourceStatePolicy.isHardDown()) {
      liveness = DISK_DOWN;
    } else if (resourceStatePolicy.isDown()) {
      liveness = SOFT_DOWN;
    }
    snapshot.put(LIVENESS, liveness);
    return snapshot;
  }
Validate the newly constructed AmbryDisk instance.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/AmbryDisk.java