Package org.apache.drill.exec.store.hive
Class HiveStoragePlugin
java.lang.Object
org.apache.drill.exec.store.AbstractStoragePlugin
org.apache.drill.exec.store.hive.HiveStoragePlugin
- 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
ConstructorDescriptionHiveStoragePlugin
(HiveStoragePluginConfig config, DrillbitContext context, String name) -
Method Summary
Modifier and TypeMethodDescriptionMethod returns a Jackson serializable object that extends a StoragePluginConfig.getFormatPlugin
(FormatPluginConfig formatConfig) Allows to get the format plugin for current storage plugin based on appropriate format plugin config usage.org.apache.hadoop.hive.conf.HiveConf
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, List<SchemaPath> columns) Get the physical scan operator for the particular GroupScan (read) node.getPhysicalScan
(String userName, JSONOptions selection, List<SchemaPath> columns, SessionOptionManager options) Get the physical scan operator for the particular GroupScan (read) node.getPhysicalScan
(String userName, JSONOptions selection, SessionOptionManager options) 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.Methods inherited from class org.apache.drill.exec.store.AbstractStoragePlugin
close, getContext, getName, getPhysicalScan, getPhysicalScan, getPhysicalScan, onDisabled, onEnabled, start, supportsInsert, supportsRead, supportsWrite, toString
-
Field Details
-
HIVE_MAPRDB_FORMAT_PLUGIN_NAME
- See Also:
-
-
Constructor Details
-
HiveStoragePlugin
public HiveStoragePlugin(HiveStoragePluginConfig config, DrillbitContext context, String name) throws ExecutionSetupException - Throws:
ExecutionSetupException
-
-
Method Details
-
getHiveConf
public org.apache.hadoop.hive.conf.HiveConf getHiveConf() -
getConfig
Description copied from interface:StoragePlugin
Method returns a Jackson serializable object that extends a StoragePluginConfig.- Returns:
- an extension of StoragePluginConfig
-
getPhysicalScan
public HiveScan getPhysicalScan(String userName, JSONOptions selection, SessionOptionManager options) throws IOException 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 reading the contents as part of Scan.selection
- The configured storage engine specific selection.options
- (optional) session options- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
getPhysicalScan
public HiveScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns) throws IOException 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 reading the contents as part of Scan.selection
- The configured storage engine specific selection.columns
- (optional) The list of column names to scan from the data source.- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
getPhysicalScan
public HiveScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns, SessionOptionManager options) throws IOException 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 reading the contents as part of Scan.selection
- The configured storage engine specific selection.columns
- (optional) The list of column names to scan from the data source.options
- (optional) session options- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
registerSchemas
public void registerSchemas(SchemaConfig schemaConfig, org.apache.calcite.schema.SchemaPlus parent) throws IOException 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.- Throws:
IOException
- in case of error during schema registration
-
getOptimizerRules
public Set<StoragePluginOptimizerRule> 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.
-
getFormatPlugin
Description copied from interface:StoragePlugin
Allows to get the format plugin for current storage plugin based on appropriate format plugin config usage.- Specified by:
getFormatPlugin
in interfaceStoragePlugin
- Overrides:
getFormatPlugin
in classAbstractStoragePlugin
- Parameters:
formatConfig
- format plugin config- Returns:
- format plugin instance
-