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 ; }
Returns true if we should format the DFS Cluster . We ll format if clean is true or if the dfsFsLocation does not exist .