code: private static boolean shouldFormatDFSCluster(String localDFSLocation,
        boolean clean) {
      boolean format = true;
      File f = new File(localDFSLocation);
      if (f.exists() && f.isDirectory() && !clean) {
        format = false;
      }
      return format;
    }
docs: Returns true if we should format the DFS Cluster. We'll format if clean is
  true, or if the dfsFsLocation does not exist.
  
  @param localDFSLocation
  The location on the local FS to hold the HDFS metadata and block
  data
  @param clean
  Specifies if we want to start a clean cluster
  @return Returns true if we should format a DFSCluster, otherwise false