Package org.apache.drill.exec.store
Class AbstractStoragePlugin
java.lang.Object
org.apache.drill.exec.store.AbstractStoragePlugin
- All Implemented Interfaces:
AutoCloseable
,SchemaFactory
,StoragePlugin
- Direct Known Subclasses:
CassandraStoragePlugin
,DrillStoragePlugin
,DruidStoragePlugin
,ElasticsearchStoragePlugin
,FileSystemPlugin
,GoogleSheetsStoragePlugin
,HBaseStoragePlugin
,HiveStoragePlugin
,HttpStoragePlugin
,InfoSchemaStoragePlugin
,JdbcStoragePlugin
,KafkaStoragePlugin
,KuduStoragePlugin
,MockStorageEngine
,MongoStoragePlugin
,OpenTSDBStoragePlugin
,PhoenixStoragePlugin
,SplunkStoragePlugin
,SystemTablePlugin
Abstract class for StorePlugin implementations.
See StoragePlugin for description of the interface intent and its methods.
-
Field Summary
Fields inherited from interface org.apache.drill.exec.store.SchemaFactory
DEFAULT_WS_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractStoragePlugin
(DrillbitContext inContext, String inName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getFormatPlugin
(FormatPluginConfig config) Allows to get the format plugin for current storage plugin based on appropriate format plugin config usage.getName()
getPhysicalScan
(String userName, JSONOptions selection) Get the physical scan operator for the particular GroupScan (read) node.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, List<SchemaPath> columns, SessionOptionManager options, MetadataProviderManager metadataProviderManager) 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.getPhysicalScan
(String userName, JSONOptions selection, SessionOptionManager options, MetadataProviderManager metadataProviderManager) Get the physical scan operator for the particular GroupScan (read) node.void
Lifecycle method allowing the plugin to perform operations when it has been disabled.void
Lifecycle method allowing the plugin to perform operations when it has been enabled.void
start()
Initialize the storage plugin.boolean
Indicates if Drill can insert to a table to this plugin.boolean
Indicates if Drill can read the table from this format.boolean
Indicates if Drill can write a table to this format (e.g.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.store.SchemaFactory
registerSchemas
Methods inherited from interface org.apache.drill.exec.store.StoragePlugin
getConfig, getOptimizerRules
-
Field Details
-
context
-
-
Constructor Details
-
AbstractStoragePlugin
-
-
Method Details
-
supportsRead
public boolean supportsRead()Description copied from interface:StoragePlugin
Indicates if Drill can read the table from this format.- Specified by:
supportsRead
in interfaceStoragePlugin
-
supportsWrite
public boolean supportsWrite()Description copied from interface:StoragePlugin
Indicates if Drill can write a table to this format (e.g. as JSON, csv, etc.).- Specified by:
supportsWrite
in interfaceStoragePlugin
-
supportsInsert
public boolean supportsInsert()Description copied from interface:StoragePlugin
Indicates if Drill can insert to a table to this plugin.- Specified by:
supportsInsert
in interfaceStoragePlugin
-
getPhysicalScan
public AbstractGroupScan 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
- 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 AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, SessionOptionManager options, MetadataProviderManager metadataProviderManager) throws IOException Description copied from interface:StoragePlugin
Get the physical scan operator for the particular GroupScan (read) node.- Specified by:
getPhysicalScan
in interfaceStoragePlugin
- Parameters:
userName
- User whom to impersonate when reading the contents as part of Scan.selection
- The configured storage engine specific selection.options
- (optional) session optionsmetadataProviderManager
- manager for handling metadata providers- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
getPhysicalScan
Description copied from interface:StoragePlugin
Get the physical scan operator for the particular GroupScan (read) node.- Specified by:
getPhysicalScan
in interfaceStoragePlugin
- 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
-
getPhysicalScan
public AbstractGroupScan 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
- 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
-
getPhysicalScan
public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns, SessionOptionManager options, MetadataProviderManager metadataProviderManager) throws IOException Description copied from interface:StoragePlugin
Get the physical scan operator for the particular GroupScan (read) node.- Specified by:
getPhysicalScan
in interfaceStoragePlugin
- 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 optionsmetadataProviderManager
- manager for handling metadata providers- Returns:
- The physical scan operator for the particular GroupScan (read) node.
- Throws:
IOException
-
getPhysicalScan
public AbstractGroupScan 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
- 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
-
start
Description copied from interface:StoragePlugin
Initialize the storage plugin. The storage plugin will not be used until this method is called.- Specified by:
start
in interfaceStoragePlugin
- Throws:
IOException
-
onEnabled
Description copied from interface:StoragePlugin
Lifecycle method allowing the plugin to perform operations when it has been enabled.- Specified by:
onEnabled
in interfaceStoragePlugin
- Throws:
Exception
- in the event of an error. The exception will be propagated but the enabling of the plugin will _not_ be rolled back.
-
onDisabled
Description copied from interface:StoragePlugin
Lifecycle method allowing the plugin to perform operations when it has been disabled.- Specified by:
onDisabled
in interfaceStoragePlugin
- Throws:
Exception
- in the event of an error. The exception will be propagated but the disabling of the plugin will _not_ be rolled back.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
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
- Parameters:
config
- format plugin config- Returns:
- format plugin instance
-
getName
- Specified by:
getName
in interfaceStoragePlugin
-
getContext
-
toString
-