Class EasyGroupScan
java.lang.Object
org.apache.drill.exec.physical.base.AbstractBase
org.apache.drill.exec.physical.base.AbstractGroupScan
org.apache.drill.exec.physical.base.AbstractFileGroupScan
org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata<TableMetadataProvider>
org.apache.drill.exec.store.dfs.easy.EasyGroupScan
- All Implemented Interfaces:
Iterable<PhysicalOperator>,GraphValue<PhysicalOperator>,FileGroupScan,FragmentLeaf,GroupScan,HasAffinity,Leaf,PhysicalOperator,Scan
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata
AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B>> -
Field Summary
Fields inherited from class org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata
columns, files, fileSet, filter, limit, matchAllMetadata, metadataProvider, nonInterestingColumnsMetadata, partitionColumns, partitions, segments, tableMetadata, usedMetastoreFields inherited from class org.apache.drill.exec.physical.base.AbstractBase
INIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocation, userNameFields inherited from interface org.apache.drill.exec.physical.base.GroupScan
ALL_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionEasyGroupScan(String userName, List<org.apache.hadoop.fs.Path> files, StoragePluginConfig storageConfig, FormatPluginConfig formatConfig, StoragePluginRegistry engineRegistry, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, TupleMetadata schema, int limit) EasyGroupScan(String userName, FileSelection selection, EasyFormatPlugin<?> formatPlugin, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, int minWidth, MetadataProviderManager metadataProvider) EasyGroupScan(String userName, FileSelection selection, EasyFormatPlugin<?> formatPlugin, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, MetadataProviderManager metadataProviderManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAssignments(List<CoordinationProtos.DrillbitEndpoint> incomingEndpoints) booleancanPushdownProjects(List<SchemaPath> columns) GroupScan should check the list of columns, and see if it could support all the columns in the list.clone(List<SchemaPath> columns) Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .clone(FileSelection selection) protected FileTableMetadataProviderBuilder<?> ReturnsTableMetadataProviderBuilderinstance which may provide metadata without using Drill Metastore.ReturnsAnalyzeInfoProviderinstance which will be used when running ANALYZE statement.List<org.apache.hadoop.fs.Path> getFiles()Returns a collection of file names associated with this GroupScan.Returns holder for metadata values which provides API to filter metadata and build new group scan instance using filtered metadata.intintAt minimum, the GroupScan requires these many fragments to run.getNewWithChildren(List<PhysicalOperator> children) Regenerate with this node with a new set of children.Get the list of Endpoints with associated affinities that this operator has preference for.getPartitionValues(LocationProvider locationProvider) getScanStats(PlannerSettings settings) org.apache.hadoop.fs.PathReturns path to the selection root.getSpecificScan(int minorFragmentId) booleanhasFiles()Return true if this GroupScan can return its selection as a list of file names (retrieved by getFiles()).voidmodifyFileSelection(FileSelection selection) protected booleanbooleanChecks whether this group scan supports filter push down.protected FileTableMetadataProviderBuilder<?> ReturnsTableMetadataProviderBuilderinstance based on specifiedMetadataProviderManagersource.toString()Methods inherited from class org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata
applyFilter, applyLimit, checkMetadataConsistency, getColumns, getColumnValueCount, getDigest, getFileSet, getFilesMetadata, getFilter, getFilterPredicate, getFilterPredicate, getFilterString, getLimit, getMetadataProvider, getNextOrEmpty, getNonInterestingColumnsMetadata, getPartitionColumns, getPartitionsMetadata, getPartitionValue, getScanStats, getSegmentsMetadata, getTableMetadata, getTypeForColumn, init, isAllDataPruned, isGroupScanFullyMatchesFilter, isImplicitOrPartCol, isMatchAllMetadata, limitMetadata, pruneForPartitions, setFilter, setFilterForRuntime, supportsLimitPushdown, usedMetastoreMethods inherited from class org.apache.drill.exec.physical.base.AbstractFileGroupScan
supportsPartitionFilterPushdownMethods inherited from class org.apache.drill.exec.physical.base.AbstractGroupScan
accept, enforceWidth, getDistributionAffinity, getInitialAllocation, getMaxAllocation, getOperatorType, getScanStats, isDistributed, isExecutable, iteratorMethods inherited from class org.apache.drill.exec.physical.base.AbstractBase
accept, getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.drill.common.graph.GraphValue
acceptMethods inherited from interface org.apache.drill.exec.physical.base.GroupScan
enforceWidth, getScanStats, isDistributedMethods inherited from interface org.apache.drill.exec.physical.base.HasAffinity
getDistributionAffinityMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.drill.exec.physical.base.PhysicalOperator
accept, getCost, getInitialAllocation, getMaxAllocation, getOperatorId, getOperatorType, getSVMode, getUserName, isBufferedOperator, isExecutable, setCost, setMaxAllocation, setOperatorId
-
Constructor Details
-
EasyGroupScan
public EasyGroupScan(String userName, List<org.apache.hadoop.fs.Path> files, StoragePluginConfig storageConfig, FormatPluginConfig formatConfig, StoragePluginRegistry engineRegistry, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, TupleMetadata schema, int limit) throws IOException - Throws:
IOException
-
EasyGroupScan
public EasyGroupScan(String userName, FileSelection selection, EasyFormatPlugin<?> formatPlugin, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, MetadataProviderManager metadataProviderManager) throws IOException - Throws:
IOException
-
EasyGroupScan
public EasyGroupScan(String userName, FileSelection selection, EasyFormatPlugin<?> formatPlugin, List<SchemaPath> columns, org.apache.hadoop.fs.Path selectionRoot, int minWidth, MetadataProviderManager metadataProvider) throws IOException - Throws:
IOException
-
-
Method Details
-
getWorkIterable
-
getSelectionRoot
public org.apache.hadoop.fs.Path getSelectionRoot()Description copied from interface:GroupScanReturns path to the selection root. If this GroupScan cannot provide selection root, it returns null.- Specified by:
getSelectionRootin interfaceGroupScan- Overrides:
getSelectionRootin classAbstractGroupScan- Returns:
- path to the selection root
-
getMinParallelizationWidth
public int getMinParallelizationWidth()Description copied from interface:GroupScanAt minimum, the GroupScan requires these many fragments to run. Currently, this is used inSimpleParallelizer- Specified by:
getMinParallelizationWidthin interfaceGroupScan- Overrides:
getMinParallelizationWidthin classAbstractGroupScan- Returns:
- the minimum number of fragments that should run
-
getMaxParallelizationWidth
public int getMaxParallelizationWidth() -
getScanStats
- Specified by:
getScanStatsin interfaceGroupScan- Overrides:
getScanStatsin classAbstractGroupScan
-
hasFiles
public boolean hasFiles()Description copied from interface:GroupScanReturn true if this GroupScan can return its selection as a list of file names (retrieved by getFiles()).- Specified by:
hasFilesin interfaceGroupScan- Overrides:
hasFilesin classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
getFiles
Description copied from interface:GroupScanReturns a collection of file names associated with this GroupScan. This should be called after checking hasFiles(). If this GroupScan cannot provide file names, it returns null.- Specified by:
getFilesin interfaceGroupScan- Overrides:
getFilesin classAbstractGroupScanWithMetadata<TableMetadataProvider>- Returns:
- collection of files paths
-
getFileSelection
-
modifyFileSelection
- Specified by:
modifyFileSelectionin interfaceFileGroupScan- Overrides:
modifyFileSelectionin classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
supportsFileImplicitColumns
protected boolean supportsFileImplicitColumns()- Specified by:
supportsFileImplicitColumnsin classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
supportsFilterPushDown
public boolean supportsFilterPushDown()Description copied from interface:GroupScanChecks whether this group scan supports filter push down.- Specified by:
supportsFilterPushDownin interfaceGroupScan- Overrides:
supportsFilterPushDownin classAbstractGroupScan- Returns:
trueif this group scan supports filter push down,falseotherwise
-
getPartitionValues
- Specified by:
getPartitionValuesin classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
getNewWithChildren
Description copied from interface:PhysicalOperatorRegenerate with this node with a new set of children. This is used in the case of materialization or optimization.- Parameters:
children-
-
getOperatorAffinity
Description copied from interface:HasAffinityGet the list of Endpoints with associated affinities that this operator has preference for.- Specified by:
getOperatorAffinityin interfaceHasAffinity- Overrides:
getOperatorAffinityin classAbstractGroupScan- Returns:
- List of EndpointAffinity objects.
-
applyAssignments
-
getSpecificScan
-
getStorageConfig
-
getFormatConfig
-
toString
-
clone
Description copied from interface:GroupScanReturns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .- Specified by:
clonein interfaceGroupScan- Overrides:
clonein classAbstractGroupScan
-
clone
- Specified by:
clonein interfaceFileGroupScan- Overrides:
clonein classAbstractFileGroupScan- Throws:
IOException
-
canPushdownProjects
Description copied from interface:GroupScanGroupScan should check the list of columns, and see if it could support all the columns in the list.- Specified by:
canPushdownProjectsin interfaceGroupScan- Overrides:
canPushdownProjectsin classAbstractGroupScan
-
getSchema
- Overrides:
getSchemain classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
getAnalyzeInfoProvider
Description copied from interface:GroupScanReturnsAnalyzeInfoProviderinstance which will be used when running ANALYZE statement.- Specified by:
getAnalyzeInfoProviderin interfaceGroupScan- Overrides:
getAnalyzeInfoProviderin classAbstractGroupScan- Returns:
AnalyzeInfoProviderinstance
-
getFilterer
Description copied from class:AbstractGroupScanWithMetadataReturns holder for metadata values which provides API to filter metadata and build new group scan instance using filtered metadata.- Specified by:
getFiltererin classAbstractGroupScanWithMetadata<TableMetadataProvider>
-
tableMetadataProviderBuilder
protected FileTableMetadataProviderBuilder<?> tableMetadataProviderBuilder(MetadataProviderManager source) Description copied from class:AbstractGroupScanWithMetadataReturnsTableMetadataProviderBuilderinstance based on specifiedMetadataProviderManagersource.- Specified by:
tableMetadataProviderBuilderin classAbstractGroupScanWithMetadata<TableMetadataProvider>- Parameters:
source- metadata provider manager- Returns:
TableMetadataProviderBuilderinstance
-
defaultTableMetadataProviderBuilder
protected FileTableMetadataProviderBuilder<?> defaultTableMetadataProviderBuilder(MetadataProviderManager source) Description copied from class:AbstractGroupScanWithMetadataReturnsTableMetadataProviderBuilderinstance which may provide metadata without using Drill Metastore.- Specified by:
defaultTableMetadataProviderBuilderin classAbstractGroupScanWithMetadata<TableMetadataProvider>- Parameters:
source- metadata provider manager- Returns:
TableMetadataProviderBuilderinstance
-