@Test public void testWriteAndRead() throws IOException { FileSystemDataset<Record> ds = new FileSystemDataset.Builder<Record>() .namespace("ns") .name("test") .configuration(getConfiguration()) .descriptor(new DatasetDescriptor.Builder() .schemaUri(USER_SCHEMA_URL) .format(format) .compressionType(compressionType) .location(testDirectory) .build()) .type(Record.class) .build(); Assert.assertFalse("Dataset is not partitioned", ds.getDescriptor() .isPartitioned()); writeTestUsers(ds, 10); checkTestUsers(ds, 10); }
@Override public DatasetDescriptor getDescriptor() { return descriptor; }
FileSystemDataset extends AbstractDataset<E> implements
    Mergeable<FileSystemDataset<E>>, InputFormatAccessor<E>, LastModifiedAccessor,
    PartitionedDataset<E>, SizeAccessor, Signalable<E>, Replaceable<View<E>> { @Override public DatasetDescriptor getDescriptor() { return descriptor; } }
FileSystemDataset extends AbstractDataset<E> implements
    Mergeable<FileSystemDataset<E>>, InputFormatAccessor<E>, LastModifiedAccessor,
    PartitionedDataset<E>, SizeAccessor, Signalable<E>, Replaceable<View<E>> { @Override public DatasetDescriptor getDescriptor() { return descriptor; } FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type);   FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionKey partitionKey,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type); private  FileSystemDataset(FileSystemDataset<?> toCopy, Class<E> type); }
FileSystemDataset extends AbstractDataset<E> implements
    Mergeable<FileSystemDataset<E>>, InputFormatAccessor<E>, LastModifiedAccessor,
    PartitionedDataset<E>, SizeAccessor, Signalable<E>, Replaceable<View<E>> { @Override public DatasetDescriptor getDescriptor() { return descriptor; } FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type);   FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionKey partitionKey,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type); private  FileSystemDataset(FileSystemDataset<?> toCopy, Class<E> type); @Override @SuppressWarnings("unchecked") Dataset<T> asType(Class<T> type); @Override URI getUri(); String getNamespace(); @Override String getName(); @Override DatasetDescriptor getDescriptor(); @Override Iterable<PartitionView<E>> getCoveringPartitions(); boolean deleteAll(); @Override boolean moveToTrash(); PathIterator pathIterator(); Iterator<Path> dirIterator(); @Override FileSystemView<E> filter(Constraints c); @Override @Nullable @SuppressWarnings("deprecation") PartitionedDataset<E> getPartition(PartitionKey key, boolean allowCreate); @Override @SuppressWarnings("deprecation") void dropPartition(PartitionKey key); @Override @SuppressWarnings("deprecation") Iterable<PartitionedDataset<E>> getPartitions(); void addExistingPartitions(); @Override String toString(); @Override void merge(FileSystemDataset<E> update); @Override boolean canReplace(View<E> part); @Override void replace(View<E> target, View<E> replacement); @Override InputFormat<E, Void> getInputFormat(Configuration conf); @SuppressWarnings("unchecked") PartitionKey keyFromDirectory(Path dir); @Override long getSize(); @Override long getLastModified(); @Override boolean isEmpty(); @Override void signalReady(); @Override boolean isReady(); }
FileSystemDataset extends AbstractDataset<E> implements
    Mergeable<FileSystemDataset<E>>, InputFormatAccessor<E>, LastModifiedAccessor,
    PartitionedDataset<E>, SizeAccessor, Signalable<E>, Replaceable<View<E>> { @Override public DatasetDescriptor getDescriptor() { return descriptor; } FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type);   FileSystemDataset(FileSystem fileSystem, Path directory,
                    String namespace, String name,
                    DatasetDescriptor descriptor, URI uri,
                    @Nullable PartitionKey partitionKey,
                    @Nullable PartitionListener partitionListener,
                    Class<E> type); private  FileSystemDataset(FileSystemDataset<?> toCopy, Class<E> type); @Override @SuppressWarnings("unchecked") Dataset<T> asType(Class<T> type); @Override URI getUri(); String getNamespace(); @Override String getName(); @Override DatasetDescriptor getDescriptor(); @Override Iterable<PartitionView<E>> getCoveringPartitions(); boolean deleteAll(); @Override boolean moveToTrash(); PathIterator pathIterator(); Iterator<Path> dirIterator(); @Override FileSystemView<E> filter(Constraints c); @Override @Nullable @SuppressWarnings("deprecation") PartitionedDataset<E> getPartition(PartitionKey key, boolean allowCreate); @Override @SuppressWarnings("deprecation") void dropPartition(PartitionKey key); @Override @SuppressWarnings("deprecation") Iterable<PartitionedDataset<E>> getPartitions(); void addExistingPartitions(); @Override String toString(); @Override void merge(FileSystemDataset<E> update); @Override boolean canReplace(View<E> part); @Override void replace(View<E> target, View<E> replacement); @Override InputFormat<E, Void> getInputFormat(Configuration conf); @SuppressWarnings("unchecked") PartitionKey keyFromDirectory(Path dir); @Override long getSize(); @Override long getLastModified(); @Override boolean isEmpty(); @Override void signalReady(); @Override boolean isReady();  }