Setting Up an External Directory
By default, external libraries are installed to the $TRANSFORMER_DIST/streamsets-libs-extras directory.
For an RPM installation, you must configure Transformer to use an external directory before you can install external libraries from Package Manager or from the stage properties panel.
For a tarball installation, you can use the default directory as you get started with Transformer. However, StreamSets recommends configuring Transformer to use an external directory to enable use of the libraries after Transformer upgrades.
Use the procedure for your Transformer installation type.
Setting Up for Tarball and RPM Installations
Before you install external libraries for a tarball or RPM installation, set up an external directory to store the libraries.
- Create a local directory external to the Transformer installation directory.For example, if you installed Transformer in the following directory:
you might create the external directory at:/opt/transformer/
/opt/transformer-extras
- Grant the user who starts Transformer ownership on the external directory.For example, if you use the default system user and group named
transformer
to run Transformer as a service, use the following command to change the owner of the external directory and all files in the directory totransformer:transformer
:chown -R transformer:transformer /opt/transformer-extras
- Add the STREAMSETS_LIBRARIES_EXTRA_DIR environment variable to the appropriate
file and point it to the external directory.
Modify environment variables using the method required by your installation type.
Set the environment variable as follows:
export STREAMSETS_LIBRARIES_EXTRA_DIR="<external directory>"
For example:
export STREAMSETS_LIBRARIES_EXTRA_DIR="/opt/transformer-extras/"
- When using the Java Security Manager, which is enabled by default, update the
Transformer security policy to include the external directory as follows:
- In the Transformer configuration directory, open the security policy file,
$TRANSFORMER_CONF/transformer-security.policy
. - Add the following lines to the
file:
// user-defined external directory grant codebase "file://<external directory>-" { permission java.security.AllPermission; };
For example:// user-defined external directory grant codebase "file:///opt/transformer-extras/-" { permission java.security.AllPermission; };
- In the Transformer configuration directory, open the security policy file,
- Restart Transformer.