FileSystemDataset(FileSystem fileSystem, Path directory,
String namespace, String name,
DatasetDescriptor descriptor, URI uri,
@Nullable PartitionListener partitionListener,
Class<E> type) {
super(type, descriptor.getSchema());
if (Formats.PARQUET.equals(descriptor.getFormat())) {
Preconditions.checkArgument(IndexedRecord.class.isAssignableFrom(type) ||
type == Object.class,
"Parquet only supports generic and specific data models, type"
+ " parameter must implement IndexedRecord");
}
this.fileSystem = fileSystem;
this.directory = directory;
this.namespace = namespace;
this.name = name;
this.descriptor = descriptor;
this.partitionStrategy =
descriptor.isPartitioned() ? descriptor.getPartitionStrategy() : null;
this.partitionListener = partitionListener;
this.convert = new PathConversion(descriptor.getSchema());
this.uri = uri;
Path signalsPath = new Path(getDirectory(fileSystem, directory),
SIGNALS_DIRECTORY_NAME);
this.signalManager = new SignalManager(fileSystem, signalsPath);
this.unbounded = new FileSystemPartitionView<E>(
this, partitionListener, signalManager, type);
this.partitionKey = null;
}