@Test public void testLoadNewHasZeroSize() { ensureCreated(); Dataset<Record> dataset = repo.load(NAMESPACE, NAME); Assert.assertEquals(0, DatasetTestUtilities.datasetSize(dataset)); }
@Override public <E> Dataset<E> load(String namespace, String name, Class<E> type) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); LOG.debug("Loading dataset: {}", name); DatasetDescriptor descriptor = metadataProvider.load(namespace, name); FileSystemDataset<E> ds = new FileSystemDataset.Builder<E>() .namespace(namespace) .name(name) .configuration(conf) .descriptor(descriptor) .type(type) .uri(new URIBuilder(getUri(), namespace, name).build()) .partitionKey(descriptor.isPartitioned() ? new PartitionKey() : null) .partitionListener(getPartitionListener()) .build(); LOG.debug("Loaded dataset:{}", ds); return ds; }
FileSystemDatasetRepository extends AbstractDatasetRepository implements TemporaryDatasetRepositoryAccessor { @Override public <E> Dataset<E> load(String namespace, String name, Class<E> type) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); LOG.debug("Loading dataset: {}", name); DatasetDescriptor descriptor = metadataProvider.load(namespace, name); FileSystemDataset<E> ds = new FileSystemDataset.Builder<E>() .namespace(namespace) .name(name) .configuration(conf) .descriptor(descriptor) .type(type) .uri(new URIBuilder(getUri(), namespace, name).build()) .partitionKey(descriptor.isPartitioned() ? new PartitionKey() : null) .partitionListener(getPartitionListener()) .build(); LOG.debug("Loaded dataset:{}", ds); return ds; } }
FileSystemDatasetRepository extends AbstractDatasetRepository implements TemporaryDatasetRepositoryAccessor { @Override public <E> Dataset<E> load(String namespace, String name, Class<E> type) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); LOG.debug("Loading dataset: {}", name); DatasetDescriptor descriptor = metadataProvider.load(namespace, name); FileSystemDataset<E> ds = new FileSystemDataset.Builder<E>() .namespace(namespace) .name(name) .configuration(conf) .descriptor(descriptor) .type(type) .uri(new URIBuilder(getUri(), namespace, name).build()) .partitionKey(descriptor.isPartitioned() ? new PartitionKey() : null) .partitionListener(getPartitionListener()) .build(); LOG.debug("Loaded dataset:{}", ds); return ds; } FileSystemDatasetRepository(Configuration conf, Path rootDirectory);  FileSystemDatasetRepository(
      Configuration conf, Path rootDirectory, MetadataProvider provider); }
FileSystemDatasetRepository extends AbstractDatasetRepository implements TemporaryDatasetRepositoryAccessor { @Override public <E> Dataset<E> load(String namespace, String name, Class<E> type) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); LOG.debug("Loading dataset: {}", name); DatasetDescriptor descriptor = metadataProvider.load(namespace, name); FileSystemDataset<E> ds = new FileSystemDataset.Builder<E>() .namespace(namespace) .name(name) .configuration(conf) .descriptor(descriptor) .type(type) .uri(new URIBuilder(getUri(), namespace, name).build()) .partitionKey(descriptor.isPartitioned() ? new PartitionKey() : null) .partitionListener(getPartitionListener()) .build(); LOG.debug("Loaded dataset:{}", ds); return ds; } FileSystemDatasetRepository(Configuration conf, Path rootDirectory);  FileSystemDatasetRepository(
      Configuration conf, Path rootDirectory, MetadataProvider provider); @Override Dataset<E> create(String namespace, String name,
                               DatasetDescriptor descriptor, Class<E> type); @Override Dataset<E> update(String namespace, String name,
                               DatasetDescriptor descriptor, Class<E> type); @Override Dataset<E> load(String namespace, String name, Class<E> type); @Override boolean delete(String namespace, String name); @Override boolean moveToTrash(String namespace, String name); @Override boolean exists(String namespace, String name); @Override Collection<String> datasets(String namespace); @Override Collection<String> namespaces(); @Override URI getUri(); @Override TemporaryDatasetRepository getTemporaryRepository(String namespace, String key); Path pathForDataset(String namespace, String name); @SuppressWarnings({"unchecked", "deprecation"}) static PartitionKey partitionKeyForPath(Dataset dataset, URI partitionPath); @Override String toString(); }
FileSystemDatasetRepository extends AbstractDatasetRepository implements TemporaryDatasetRepositoryAccessor { @Override public <E> Dataset<E> load(String namespace, String name, Class<E> type) { Preconditions.checkNotNull(namespace, "Namespace cannot be null"); Preconditions.checkNotNull(name, "Dataset name cannot be null"); LOG.debug("Loading dataset: {}", name); DatasetDescriptor descriptor = metadataProvider.load(namespace, name); FileSystemDataset<E> ds = new FileSystemDataset.Builder<E>() .namespace(namespace) .name(name) .configuration(conf) .descriptor(descriptor) .type(type) .uri(new URIBuilder(getUri(), namespace, name).build()) .partitionKey(descriptor.isPartitioned() ? new PartitionKey() : null) .partitionListener(getPartitionListener()) .build(); LOG.debug("Loaded dataset:{}", ds); return ds; } FileSystemDatasetRepository(Configuration conf, Path rootDirectory);  FileSystemDatasetRepository(
      Configuration conf, Path rootDirectory, MetadataProvider provider); @Override Dataset<E> create(String namespace, String name,
                               DatasetDescriptor descriptor, Class<E> type); @Override Dataset<E> update(String namespace, String name,
                               DatasetDescriptor descriptor, Class<E> type); @Override Dataset<E> load(String namespace, String name, Class<E> type); @Override boolean delete(String namespace, String name); @Override boolean moveToTrash(String namespace, String name); @Override boolean exists(String namespace, String name); @Override Collection<String> datasets(String namespace); @Override Collection<String> namespaces(); @Override URI getUri(); @Override TemporaryDatasetRepository getTemporaryRepository(String namespace, String key); Path pathForDataset(String namespace, String name); @SuppressWarnings({"unchecked", "deprecation"}) static PartitionKey partitionKeyForPath(Dataset dataset, URI partitionPath); @Override String toString();  }