Class MongoStoragePlugin
java.lang.Object
org.apache.drill.exec.store.AbstractStoragePlugin
org.apache.drill.exec.store.mongo.MongoStoragePlugin
- All Implemented Interfaces:
AutoCloseable
,SchemaFactory
,StoragePlugin
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.AbstractStoragePlugin
context
Fields inherited from interface org.apache.drill.exec.store.SchemaFactory
DEFAULT_WS_NAME
-
Constructor Summary
ConstructorDescriptionMongoStoragePlugin
(MongoStoragePluginConfig mongoConfig, DrillbitContext context, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
org.apache.calcite.plan.Convention
com.mongodb.client.MongoClient
com.mongodb.client.MongoClient
Method returns a Jackson serializable object that extends a StoragePluginConfig.Set<? extends org.apache.calcite.plan.RelOptRule>
getOptimizerRules
(OptimizerRulesContext optimizerContext, PlannerPhase phase) An implementation of this method will return one or more specialized rules that Drill query optimizer can leverage in physical space.getPhysicalScan
(String userName, JSONOptions selection) Get the physical scan operator for the particular GroupScan (read) node.void
registerSchemas
(SchemaConfig schemaConfig, org.apache.calcite.schema.SchemaPlus parent) Register the schemas provided by this SchemaFactory implementation under the given parent schema.boolean
Indicates if Drill can read the table from this format.Methods inherited from class org.apache.drill.exec.store.AbstractStoragePlugin
getContext, getFormatPlugin, getName, getPhysicalScan, getPhysicalScan, getPhysicalScan, getPhysicalScan, getPhysicalScan, onDisabled, onEnabled, start, supportsInsert, supportsWrite, toString
-
Constructor Details
-
MongoStoragePlugin
public MongoStoragePlugin(MongoStoragePluginConfig mongoConfig, DrillbitContext context, String name)
-
-
Method Details
-
getConfig
Description copied from interface:StoragePlugin
Method returns a Jackson serializable object that extends a StoragePluginConfig.- Returns:
- an extension of StoragePluginConfig
-
registerSchemas
Description copied from interface:SchemaFactory
Register the schemas provided by this SchemaFactory implementation under the given parent schema.- Parameters:
schemaConfig
- Configuration for schema objects.parent
- Reference to parent schema.
-
supportsRead
public boolean supportsRead()Description copied from interface:StoragePlugin
Indicates if Drill can read the table from this format.- Specified by:
supportsRead
in interfaceStoragePlugin
- Overrides:
supportsRead
in classAbstractStoragePlugin
-
getPhysicalScan
Description copied from interface:StoragePlugin
Get the physical scan operator for the particular GroupScan (read) node.- Specified by:
getPhysicalScan
in interfaceStoragePlugin
- Overrides:
getPhysicalScan
in classAbstractStoragePlugin
- Parameters:
userName
- User whom to impersonate when when reading the contents as part of Scan.selection
- The configured storage engine specific selection.- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
getOptimizerRules
public Set<? extends org.apache.calcite.plan.RelOptRule> getOptimizerRules(OptimizerRulesContext optimizerContext, PlannerPhase phase) Description copied from interface:StoragePlugin
An implementation of this method will return one or more specialized rules that Drill query optimizer can leverage in physical space. Otherwise, it should return an empty set.- Returns:
- an empty set or a set of plugin specific physical optimizer rules.
-
convention
public org.apache.calcite.plan.Convention convention() -
getClient
public com.mongodb.client.MongoClient getClient() -
getClient
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractStoragePlugin
-