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
FieldsModifier and TypeFieldDescriptionprotected List<List<PartitionLocation>> A sequence of sublists of partition locations combined into a single super list.protected booleanIndicates if the sublists of the partition locations has been createdFields inherited from interface org.apache.drill.exec.planner.PartitionDescriptor
PARTITION_BATCH_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidCreate sublists of the partition locations, each sublist of size at mostPartitionDescriptor.PARTITION_BATCH_SIZEorg.apache.calcite.rel.core.TableScancreateTableScan(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.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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_SIZEFor 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:
iteratorin interfaceIterable<List<PartitionLocation>>
-
supportsMetadataCachePruning
public boolean supportsMetadataCachePruning()- Specified by:
supportsMetadataCachePruningin 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:PartitionDescriptorCreate 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:
createTableScanin interfacePartitionDescriptor- Parameters:
newPartitions-cacheFileRoot-isAllPruned-metaContext-- Throws:
Exception
-