Class FileScanLifecycle
FileSchemaNegotiator
passes
file information to each reader.
Only a single storage plugin uses the file scan framework:
the FileSystemPlugin
via the EasyFormatPlugin
. To
make client code as simple as possible, the Drill file system and list
of files is passed though this framework to the
FileReaderFactory
, then to the FileSchemaNegotiator
which presents them to the reader. This approach avoids the need
for each format handle this common boilerplate code.
The FileScanOptions
holds the list of splits to scan. The
FileReaderFactory
iterates over those splits, and
creates each reader just-in-time to process that split.
Implicit columns are defined here at the beginning of the scan as
part of the scan schema mechanism. Each consists of a column "marker"
that identifies the column purposes. Then, on each file, the implicit
column is resolved to a value specific to that file. A
StaticBatchBuilder
then fills in the needed column values
for each batch which the reader produces.
-
Constructor Summary
ConstructorDescriptionFileScanLifecycle
(OperatorContext context, FileScanLifecycleBuilder options) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected SchemaNegotiatorImpl
newNegotiator
(ReaderLifecycle readerLifecycle) Methods inherited from class org.apache.drill.exec.physical.impl.scan.v3.lifecycle.ScanLifecycle
allocator, batchCount, context, errorContext, hasOutputSchema, nextReader, options, outputSchema, readerFactory, rowCount, schemaTracker, tallyBatch, vectorCache
-
Constructor Details
-
FileScanLifecycle
-
-
Method Details
-
fileScanOptions
-
fileSystem
-
implicitColumnsHandler
-
newNegotiator
- Overrides:
newNegotiator
in classScanLifecycle
-
close
public void close()- Overrides:
close
in classScanLifecycle
-