Class IndexDiscoverBase
java.lang.Object
org.apache.drill.exec.planner.index.IndexDiscoverBase
- All Implemented Interfaces:
IndexDiscover
IndexDiscoverBase is the layer to read index configurations of tables on storage plugins,
then based on the properties it collected, get the StoragePlugin from StoragePluginRegistry,
together with indexes information, build an IndexCollection
-
Constructor Summary
ConstructorDescriptionIndexDiscoverBase
(AbstractDbGroupScan inScan, DrillScanRelBase inScanPrel) IndexDiscoverBase
(AbstractDbGroupScan inScan, ScanPrel inScanPrel) -
Method Summary
Modifier and TypeMethodDescriptionbuildDrillTable
(IndexDescriptor idxDesc) Abstract function getDrillTable will be implemented the IndexDiscover within storage plugin(e.g.getExternalDrillTable
(IndexDescriptor idxDesc) When there is storageName in IndexDescriptor, get a DrillTable instance based on the StorageName and other informaiton in idxDesc that helps identifying the table.abstract DrillTable
getNativeDrillTable
(IndexDescriptor idxDesc) When it is native index(index provided by native storage plugin), the actual IndexDiscover should provide the implementation to get the DrillTable object of index, Otherwise, we call IndexDiscoverable interface exposed from external storage plugin's SchemaFactory to get the desired DrillTable.org.apache.calcite.rel.RelNode
getTableIndex
(String tableName, String storageName, Collection<DrillIndexDefinition> indexDefs) void
materializeIndex
(String storageName, DrillIndexDescriptor index) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.planner.index.IndexDiscover
getTableIndex
-
Constructor Details
-
IndexDiscoverBase
-
IndexDiscoverBase
-
-
Method Details
-
getOriginalScan
-
getOriginalScanRel
public org.apache.calcite.rel.RelNode getOriginalScanRel() -
getTableIndex
public IndexCollection getTableIndex(String tableName, String storageName, Collection<DrillIndexDefinition> indexDefs) -
materializeIndex
-
getExternalDrillTable
When there is storageName in IndexDescriptor, get a DrillTable instance based on the StorageName and other informaiton in idxDesc that helps identifying the table.- Parameters:
idxDesc
-- Returns:
-
buildDrillTable
Abstract function getDrillTable will be implemented the IndexDiscover within storage plugin(e.g. HBase, MaprDB) since the implementations of AbstractStoragePlugin, IndexDescriptor and DrillTable in that storage plugin may have the implement details.- Parameters:
idxDesc
-- Returns:
-
getNativeDrillTable
When it is native index(index provided by native storage plugin), the actual IndexDiscover should provide the implementation to get the DrillTable object of index, Otherwise, we call IndexDiscoverable interface exposed from external storage plugin's SchemaFactory to get the desired DrillTable.- Parameters:
idxDesc
-- Returns:
-