public class PluginBootstrapLoaderImpl extends Object implements PluginBootstrapLoader
The files are given via indirections in the config system to allow easier testing when "non-stock" configurations.
The core plugins share a single file in the exec module which has a list of storage plugins used as default on fresh start up. Then we have contrib module where some plugins and formats reside. We want them to be included in default plugins as well during fresh start up which is done by reading each bootstrap file in the classpath.
bootstrap-storage-plugins.jsonloaded via this process. However, format plugins are defined inside storage plugins. This presents a problem when the format is defined outside of the core (such as in the contrib module). In this case, when new format was added, the developer had to modify the
bootstrap-storage-plugins.jsonin exec module to ensure that the new format was included.
bootstrap-format-plugins.json solves this problem: it allows non-core
modules to include formats during bootstrap. The file must still indicate which
plugin (config) to modify, and must list the same format for each supported file
system plugin such as
dfs and . Despite this limitation, the additional
file makes the non-core format plugins independent of the core files.
The resulting bootstrap process is to 1) gather the storage plugins, and 2) merge any format bootstrap into these plugins.
If the system is new, configurations from the upgrade file replace (override) values from the bootstrap file. The net effect, bootstrap plus upgrades, are written into the persistent store.
If the system is upgraded, then the current technique uses a highly unreliable system: an upgrade file exists. Any upgrades are applied on top of the user's stored values. The upgrade file is then deleted to avoid applying the same upgrades multiple times. Not idea, but it is what it is for now.
storage-plugins-override.conf. Unlike th bootstrap file, only one upgrade file can appear in the class path. The upgrade file is optional.
|Constructor and Description|
|Modifier and Type||Method and Description|
Drill has detected that this is a new installation.
Drill successfully applied the plugin upgrades from
Get the new storage plugins from the
public PluginBootstrapLoaderImpl(PluginRegistryContext context)
public StoragePlugins bootstrapPlugins() throws IOException
protected StoragePlugins loadBootstrapPlugins(Map<String,URL> pluginURLMap) throws IOException
public StoragePlugins updatedPlugins()
ConfigConstants#STORAGE_PLUGINS_OVERRIDE_CONFfile if it exists, null otherwise
public void onUpgrade()
PluginBootstrapLoader.updatedPlugins(). Use this event to mark this version as having been upgraded. (Again, this is crude and may not actually work. See DRILL-7613.)
Copyright © 1970 The Apache Software Foundation. All rights reserved.