-
Notifications
You must be signed in to change notification settings - Fork 5.5k
docs: Improve documentation for deploying custom plugins #27407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
steveburnett
merged 3 commits into
prestodb:master
from
saurabhmahawar:improve-plugin-deployment
Mar 24, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
presto-docs/src/main/sphinx/installation/deploy-custom-plugins.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| ======================== | ||
| Deploying Custom Plugins | ||
| ======================== | ||
|
|
||
| Presto has a plugin-based architecture. Connectors, functions, access control | ||
| implementations, and other features are provided by plugins that are loaded at | ||
| server startup. Many plugins are bundled with a Presto installation, but | ||
| additional plugins can be deployed manually. | ||
|
|
||
| This topic explains how to deploy a custom or additional plugin to a Presto | ||
| installation. | ||
|
|
||
| .. contents:: | ||
| :local: | ||
| :backlinks: none | ||
| :depth: 1 | ||
|
|
||
| Overview | ||
| -------- | ||
|
|
||
| When Presto starts, it scans the plugin directory for subdirectories. Each | ||
| subdirectory is treated as a separate plugin and must contain all of the | ||
| Java Archive (JAR) files required by that plugin. Presto loads each plugin | ||
| into a separate class loader to ensure that plugins are isolated from each | ||
| other. | ||
|
|
||
| If a catalog configuration file (in ``etc/catalog``) references a connector | ||
| whose corresponding plugin has not been deployed, Presto will fail to start. | ||
|
|
||
| Plugin Directory | ||
| ---------------- | ||
|
|
||
| By default, the plugin directory is the ``plugin`` directory relative to the | ||
| Presto installation directory. This can be changed using the ``plugin.dir`` | ||
| configuration property. | ||
|
|
||
| The plugin directory is structured as follows, where each subdirectory | ||
| contains the JAR files for a single plugin: | ||
|
|
||
| .. code-block:: none | ||
|
|
||
| plugin/ | ||
| ├── hive-hadoop2/ | ||
| │ ├── presto-hive-hadoop2-0.296.jar | ||
| │ └── ... (dependency JARs) | ||
| ├── tpch/ | ||
| │ ├── presto-tpch-0.296.jar | ||
| │ └── ... (dependency JARs) | ||
| └── gsheets/ | ||
| ├── presto-google-sheets-0.296.jar | ||
| └── ... (dependency JARs) | ||
|
|
||
| Deploying a Plugin | ||
| ------------------ | ||
|
|
||
| To deploy a plugin: | ||
|
|
||
| 1. Obtain the plugin directory for the plugin you want to deploy. This | ||
| directory should contain the plugin JAR file and all of its required | ||
| dependencies. Plugin directories can be obtained by building the plugin | ||
| from source or from a Presto distribution that includes the plugin. | ||
|
|
||
| 2. Copy the plugin directory into the Presto plugin directory. The name of the | ||
| subdirectory does not need to match the connector name, but using a matching | ||
| name is recommended for clarity. | ||
|
|
||
| For example, to deploy the Google Sheets connector plugin on a Presto | ||
| installation located at ``/opt/presto-server``: | ||
|
|
||
| .. code-block:: none | ||
|
|
||
| cp -r presto-google-sheets-0.296/ /opt/presto-server/plugin/gsheets | ||
|
|
||
| 3. Deploy the plugin on all nodes in the Presto cluster (coordinator and | ||
| workers). Every node must have the same set of plugins installed. | ||
|
|
||
| 4. Restart Presto. A plugin is loaded only at server startup. | ||
|
|
||
| Verifying a Plugin | ||
| ------------------ | ||
|
|
||
| After restarting Presto, check the server log file (``var/log/server.log``) | ||
| for entries showing that the plugin was loaded and its connector was | ||
| registered. For example: | ||
|
|
||
| .. code-block:: none | ||
|
|
||
| INFO main com.facebook.presto.server.PluginManagerUtil -- Loading plugin /opt/presto-server/plugin/gsheets -- | ||
| INFO main com.facebook.presto.server.PluginManagerUtil Installing com.facebook.presto.google.sheets.SheetsPlugin | ||
| INFO main com.facebook.presto.server.PluginManager Registering connector gsheets | ||
| INFO main com.facebook.presto.server.PluginManagerUtil -- Finished loading plugin /opt/presto-server/plugin/gsheets -- | ||
|
|
||
| If the server log shows ``======== SERVER STARTED ========``, the plugin was | ||
| loaded successfully. | ||
|
|
||
| Troubleshooting | ||
| --------------- | ||
|
|
||
| **Server fails to start with "No factory for connector"** | ||
|
|
||
| .. code-block:: none | ||
|
|
||
| ERROR main com.facebook.presto.server.PrestoServer No factory for connector gsheets | ||
| java.lang.IllegalArgumentException: No factory for connector gsheets | ||
|
|
||
| This error indicates that the connector plugin has not been deployed. Verify | ||
| that: | ||
|
|
||
| * The plugin directory exists in the Presto plugin directory. | ||
| * The plugin directory contains the required JAR files. | ||
| * Presto has been restarted after deploying the plugin. | ||
|
|
||
| **Plugin directory is empty or contains incorrect JARs** | ||
|
|
||
| Each plugin directory must contain the plugin JAR file and all of its | ||
| transitive dependencies. If a required JAR file is missing, the plugin may | ||
| fail to load or the connector may produce errors at runtime. | ||
|
|
||
| See Also | ||
| -------- | ||
|
|
||
| * :doc:`deployment` -- Deploying Presto | ||
| * :doc:`/develop/spi-overview` -- SPI Overview, including information about | ||
| building plugins from source | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.