@Test public void testCreateMetadataFiles() throws IOException { ensureCreated(); Path namedDirectory = new Path(testDirectory, new Path(NAMESPACE, NAME)); Path metadataDirectory = new Path(namedDirectory, ".metadata"); Path propertiesFile = new Path(metadataDirectory, "descriptor.properties"); Path schemaDirectory = new Path(metadataDirectory, "schemas"); Assert.assertTrue("Named directory should exist for name:" + NAME, fileSystem.exists(namedDirectory)); Assert.assertTrue("Metadata directory should exist", fileSystem.exists(metadataDirectory)); Assert.assertTrue("Descriptor properties file should exist", fileSystem.exists(propertiesFile)); Assert.assertTrue("Descriptor schema directory should exist", fileSystem.exists(schemaDirectory)); }
@Override public boolean exists(String namespace, String name) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); try { find(namespace, name); return true; } catch (DatasetNotFoundException e) { return false; } }
FileSystemMetadataProvider extends AbstractMetadataProvider { @Override public boolean exists(String namespace, String name) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); try { find(namespace, name); return true; } catch (DatasetNotFoundException e) { return false; } } }
FileSystemMetadataProvider extends AbstractMetadataProvider { @Override public boolean exists(String namespace, String name) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); try { find(namespace, name); return true; } catch (DatasetNotFoundException e) { return false; } } FileSystemMetadataProvider(Configuration conf, Path rootDirectory); }
FileSystemMetadataProvider extends AbstractMetadataProvider { @Override public boolean exists(String namespace, String name) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); try { find(namespace, name); return true; } catch (DatasetNotFoundException e) { return false; } } FileSystemMetadataProvider(Configuration conf, Path rootDirectory); @Override DatasetDescriptor load(String namespace, String name); @Override DatasetDescriptor create(String namespace, String name, DatasetDescriptor descriptor); @Override DatasetDescriptor update(String namespace, String name, DatasetDescriptor descriptor); @Override boolean delete(String namespace, String name); @Override boolean moveToTrash(String namespace, String name); @Override boolean exists(String namespace, String name); @SuppressWarnings("deprecation") @Override Set<String> namespaces(); @SuppressWarnings("deprecation") @Override Set<String> datasets(String namespace); @Override String toString(); }
FileSystemMetadataProvider extends AbstractMetadataProvider { @Override public boolean exists(String namespace, String name) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); try { find(namespace, name); return true; } catch (DatasetNotFoundException e) { return false; } } FileSystemMetadataProvider(Configuration conf, Path rootDirectory); @Override DatasetDescriptor load(String namespace, String name); @Override DatasetDescriptor create(String namespace, String name, DatasetDescriptor descriptor); @Override DatasetDescriptor update(String namespace, String name, DatasetDescriptor descriptor); @Override boolean delete(String namespace, String name); @Override boolean moveToTrash(String namespace, String name); @Override boolean exists(String namespace, String name); @SuppressWarnings("deprecation") @Override Set<String> namespaces(); @SuppressWarnings("deprecation") @Override Set<String> datasets(String namespace); @Override String toString();  }