@Test public void testNoSchemaManagerDirectory() throws IOException { SchemaManager manager = SchemaManager.load(getConfiguration(), new Path(testDirectory, "NO_SUCH_DIRECTORY")); Assert.assertNull(manager); }
public static SchemaManager load(Configuration conf, Path schemaDirectory) { try { FileSystem rootFileSystem = schemaDirectory.getFileSystem(conf); if (rootFileSystem.exists(schemaDirectory)) { return new SchemaManager(schemaDirectory, rootFileSystem); } else { return null; } } catch (IOException e) { throw new DatasetIOException ("Cannot load schema manager at:" + schemaDirectory, e); } }
SchemaManager { public static SchemaManager load(Configuration conf, Path schemaDirectory) { try { FileSystem rootFileSystem = schemaDirectory.getFileSystem(conf); if (rootFileSystem.exists(schemaDirectory)) { return new SchemaManager(schemaDirectory, rootFileSystem); } else { return null; } } catch (IOException e) { throw new DatasetIOException ("Cannot load schema manager at:" + schemaDirectory, e); } } }
SchemaManager { public static SchemaManager load(Configuration conf, Path schemaDirectory) { try { FileSystem rootFileSystem = schemaDirectory.getFileSystem(conf); if (rootFileSystem.exists(schemaDirectory)) { return new SchemaManager(schemaDirectory, rootFileSystem); } else { return null; } } catch (IOException e) { throw new DatasetIOException ("Cannot load schema manager at:" + schemaDirectory, e); } } private  SchemaManager(Path schemaDirectory, FileSystem rootFileSystem); }
SchemaManager { public static SchemaManager load(Configuration conf, Path schemaDirectory) { try { FileSystem rootFileSystem = schemaDirectory.getFileSystem(conf); if (rootFileSystem.exists(schemaDirectory)) { return new SchemaManager(schemaDirectory, rootFileSystem); } else { return null; } } catch (IOException e) { throw new DatasetIOException ("Cannot load schema manager at:" + schemaDirectory, e); } } private  SchemaManager(Path schemaDirectory, FileSystem rootFileSystem); static SchemaManager create(Configuration conf, Path schemaDirectory); static SchemaManager load(Configuration conf, Path schemaDirectory); URI getNewestSchemaURI(); Schema getNewestSchema(); URI importSchema(Path schemaPath); URI writeSchema(Schema schema); Map<Integer,Schema> getSchemas(); }
SchemaManager { public static SchemaManager load(Configuration conf, Path schemaDirectory) { try { FileSystem rootFileSystem = schemaDirectory.getFileSystem(conf); if (rootFileSystem.exists(schemaDirectory)) { return new SchemaManager(schemaDirectory, rootFileSystem); } else { return null; } } catch (IOException e) { throw new DatasetIOException ("Cannot load schema manager at:" + schemaDirectory, e); } } private  SchemaManager(Path schemaDirectory, FileSystem rootFileSystem); static SchemaManager create(Configuration conf, Path schemaDirectory); static SchemaManager load(Configuration conf, Path schemaDirectory); URI getNewestSchemaURI(); Schema getNewestSchema(); URI importSchema(Path schemaPath); URI writeSchema(Schema schema); Map<Integer,Schema> getSchemas();  }