private void validate() {
    if (datanode == null || mountPath == null) {
      throw new IllegalStateException("datanode and mount path cannot be null.");
    }
    if (mountPath.length() == 0) {
      throw new IllegalStateException("Mount path cannot be zero-length string.");
    }
    File mountPathFile = new File(mountPath);
    if (!mountPathFile.isAbsolute()) {
      throw new IllegalStateException("Mount path has to be an absolute path.");
    }
    ClusterMapUtils.validateDiskCapacity(rawCapacityBytes, maxCapacityInBytes);
  }
Validate the newly constructed AmbryDisk instance.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/AmbryDisk.java