Class FileScanFramework
java.lang.Object
org.apache.drill.exec.physical.impl.scan.framework.ManagedScanFramework
org.apache.drill.exec.physical.impl.scan.file.FileScanFramework
- All Implemented Interfaces:
ScanOperatorEvents
- Direct Known Subclasses:
ColumnsScanFramework
The file scan framework adds into the scan framework support for implicit
reading from DFS splits (a file and a block). Since this framework is
file-based, it also adds support for file metadata (AKA implicit columns.
The file scan framework brings together a number of components:
- The set of options defined by the base framework.
- The set of files and/or blocks to read.
- The file system configuration to use for working with the files or blocks.
- The factory class to create a reader for each of the files or blocks defined above. (Readers are created one-by-one as files are read.)
- Options as defined by the base class.
The framework iterates over file descriptions, creating readers at the moment they are needed. This allows simpler logic because, at the point of reader creation, we have a file system, context and so on.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Iterates over the splits for the present scan.static class
static class
Options for a file-based scan.static interface
The file schema negotiator adds no behavior at present, but is created as a placeholder anticipating the need for file-specific behavior later.static class
Implementation of the file-level schema negotiator.Nested classes/interfaces inherited from class org.apache.drill.exec.physical.impl.scan.framework.ManagedScanFramework
ManagedScanFramework.ReaderFactory, ManagedScanFramework.ScanFrameworkBuilder
-
Field Summary
Fields inherited from class org.apache.drill.exec.physical.impl.scan.framework.ManagedScanFramework
builder, context, readerFactory, scanOrchestrator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected SchemaNegotiatorImpl
protected org.apache.hadoop.mapred.FileSplit
boolean
open
(ShimBatchReader shimBatchReader) options()
Methods inherited from class org.apache.drill.exec.physical.impl.scan.framework.ManagedScanFramework
bind, close, context, errorContext, nextReader, outputSchema, scanOrchestrator
-
Constructor Details
-
FileScanFramework
-
-
Method Details
-
options
-
configure
protected void configure()- Overrides:
configure
in classManagedScanFramework
-
nextSplit
protected org.apache.hadoop.mapred.FileSplit nextSplit() -
newNegotiator
- Overrides:
newNegotiator
in classManagedScanFramework
-
open
- Overrides:
open
in classManagedScanFramework
-
fileSystem
-