private static void checkExists ( FileSystem fs , Path location ) { try { if ( ! fs . exists ( location ) ) { throw new DatasetNotFoundException ( "Descriptor location does not exist: " + location ) ; } } catch ( IOException ex ) { throw new DatasetIOException ( "Cannot access descriptor location: " + location , ex ) ; } }
Precondition - style static validation that a dataset exists