public interface StoragePluginRegistry extends Iterable<Map.Entry<String,StoragePlugin>>, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static String |
INFORMATION_SCHEMA_PLUGIN |
static String |
PSTORE_NAME |
static String |
STORAGE_PLUGIN_REGISTRY_IMPL |
static String |
SYS_PLUGIN |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlugin(String name,
StoragePlugin plugin)
Add a plugin to the registry using the provided name.
|
StoragePlugin |
createOrUpdate(String name,
StoragePluginConfig config,
boolean persist)
Create a plugin by name and configuration.
|
void |
deletePlugin(String name)
Delete a plugin by name
|
FormatPlugin |
getFormatPlugin(StoragePluginConfig storageConfig,
FormatPluginConfig formatConfig)
Get the Format plugin for the FileSystemPlugin associated with the provided storage config and format config.
|
StoragePlugin |
getPlugin(StoragePluginConfig config)
Get a plugin by configuration.
|
StoragePlugin |
getPlugin(String name)
Get a plugin by name.
|
SchemaFactory |
getSchemaFactory()
Get the Schema factory associated with this storage plugin registry.
|
PersistentStore<StoragePluginConfig> |
getStore()
Get the PStore for this StoragePluginRegistry.
|
void |
init()
Initialize the storage plugin registry.
|
closestatic final String SYS_PLUGIN
static final String INFORMATION_SCHEMA_PLUGIN
static final String STORAGE_PLUGIN_REGISTRY_IMPL
static final String PSTORE_NAME
void init()
throws DrillbitStartupException
DrillbitStartupExceptionvoid deletePlugin(String name)
name - The name of the storage plugin to delete.StoragePlugin createOrUpdate(String name, StoragePluginConfig config, boolean persist) throws ExecutionSetupException
name - The name of the pluginconfig - The plugin configurationpersist - Whether to persist the plugin for later use or treat it as ephemeral.ExecutionSetupExceptionStoragePlugin getPlugin(String name) throws ExecutionSetupException
name - The name of the pluginExecutionSetupExceptionStoragePlugin getPlugin(StoragePluginConfig config) throws ExecutionSetupException
config - The configuration for the plugin.ExecutionSetupExceptionvoid addPlugin(String name, StoragePlugin plugin)
name - plugin - FormatPlugin getFormatPlugin(StoragePluginConfig storageConfig, FormatPluginConfig formatConfig) throws ExecutionSetupException
storageConfig - The storage config for the associated FileSystemPluginformatConfig - The format config for the associated FormatPluginExecutionSetupExceptionPersistentStore<StoragePluginConfig> getStore()
SchemaFactory getSchemaFactory()
Copyright © 2017 The Apache Software Foundation. All rights reserved.