Package org.apache.drill.exec.planner
Class AbstractPartitionDescriptor
java.lang.Object
org.apache.drill.exec.planner.AbstractPartitionDescriptor
- All Implemented Interfaces:
Iterable<List<PartitionLocation>>
,PartitionDescriptor
- Direct Known Subclasses:
FileSystemPartitionDescriptor
,HivePartitionDescriptor
,ParquetPartitionDescriptor
public abstract class AbstractPartitionDescriptor
extends Object
implements PartitionDescriptor, Iterable<List<PartitionLocation>>
Abstract base class for file system based partition descriptors and Hive
partition descriptors.
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<List<PartitionLocation>>
A sequence of sublists of partition locations combined into a single super list.protected boolean
Indicates if the sublists of the partition locations has been createdFields inherited from interface org.apache.drill.exec.planner.PartitionDescriptor
PARTITION_BATCH_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Create sublists of the partition locations, each sublist of size at mostPartitionDescriptor.PARTITION_BATCH_SIZE
org.apache.calcite.rel.core.TableScan
createTableScan
(List<PartitionLocation> newPartitions, org.apache.hadoop.fs.Path cacheFileRoot, boolean isAllPruned, MetadataContext metaContext) Create a new TableScan rel node, given the lists of new partitions or new files to scan and a path to a metadata cache fileiterator()
Iterator that traverses over the super list of partition locations and each time returns a single sublist of partition locations.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.drill.exec.planner.PartitionDescriptor
createTableScan, getBaseTableLocation, getIdIfValid, getMaxHierarchyLevel, getPartitionHierarchyIndex, getVectorType, isPartitionName, populatePartitionVectors
-
Field Details
-
locationSuperList
A sequence of sublists of partition locations combined into a single super list. The size of each sublist is at mostPartitionDescriptor.PARTITION_BATCH_SIZE
For example if the size is 3, the complete list could be: {(a, b, c), {d, e, f), (g, h)} -
sublistsCreated
protected boolean sublistsCreatedIndicates if the sublists of the partition locations has been created
-
-
Constructor Details
-
AbstractPartitionDescriptor
public AbstractPartitionDescriptor()
-
-
Method Details
-
createPartitionSublists
protected abstract void createPartitionSublists()Create sublists of the partition locations, each sublist of size at mostPartitionDescriptor.PARTITION_BATCH_SIZE
-
iterator
Iterator that traverses over the super list of partition locations and each time returns a single sublist of partition locations.- Specified by:
iterator
in interfaceIterable<List<PartitionLocation>>
-
supportsMetadataCachePruning
public boolean supportsMetadataCachePruning()- Specified by:
supportsMetadataCachePruning
in interfacePartitionDescriptor
-
createTableScan
public org.apache.calcite.rel.core.TableScan createTableScan(List<PartitionLocation> newPartitions, org.apache.hadoop.fs.Path cacheFileRoot, boolean isAllPruned, MetadataContext metaContext) throws Exception Description copied from interface:PartitionDescriptor
Create a new TableScan rel node, given the lists of new partitions or new files to scan and a path to a metadata cache file- Specified by:
createTableScan
in interfacePartitionDescriptor
- Throws:
Exception
-