Class ScanEventListener
java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.lifecycle.ScanEventListener
- All Implemented Interfaces:
ScanOperatorEvents
Binds the scan lifeycle to the scan operator. Defers creating
the scan lifecycle until the operator context is available
to allow most fields in the scan lifecycle to be immutable.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(OperatorContext context) Build the scan-level schema from the physical operator select list.void
close()
Called when the scan operator itself is closed.A scanner typically readers multiple data sources (such as files or file blocks.) A batch reader handles each read.
-
Constructor Details
-
ScanEventListener
-
-
Method Details
-
bind
Description copied from interface:ScanOperatorEvents
Build the scan-level schema from the physical operator select list. The operator context is provided to allow access to the user name, to options, and to other information that might influence schema resolution.After this call, the schema manager should be ready to build a reader-specific schema for each reader as it is opened.
- Specified by:
bind
in interfaceScanOperatorEvents
- Parameters:
context
- the operator context for the scan operator
-
nextReader
Description copied from interface:ScanOperatorEvents
A scanner typically readers multiple data sources (such as files or file blocks.) A batch reader handles each read. This method returns the next reader in whatever sequence that this scan defines.The preferred implementation is to create each batch reader in this call to minimize resource usage. Production queries may read thousands of files or blocks, so incremental reader creation can be far more efficient than creating readers at the start of the scan.
- Specified by:
nextReader
in interfaceScanOperatorEvents
- Returns:
- a batch reader for one of the scan elements within the scan physical plan for this scan operator
-
close
public void close()Description copied from interface:ScanOperatorEvents
Called when the scan operator itself is closed. Indicates that no more readers are available.- Specified by:
close
in interfaceScanOperatorEvents
-