Setting Up an External Directory
By default, Data Collector expects external libraries to be installed to the $SDC_EXTERNAL_RESOURCES/streamsets-libs-extras directory.
For a tarball or Cloudera Manager installation, you can use the default directory as you get started with Data Collector. However, StreamSets recommends configuring Data Collector to use an external directory to enable use of the libraries after Data Collector upgrades.
For an RPM installation, you must configure Data Collector to use an external directory before you can install external libraries from Package Manager or from the stage properties panel.
Use the required procedure for your installation type.
Setting Up for Tarball and RPM
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 Data Collector installation
directory.For example, if you installed Data Collector in the following directory:
you might create the external directory at:/opt/sdc/
/opt/sdc-extras
- Grant the user who starts Data Collector ownership on the external directory.For example, if you use the default system user and group named
sdc
to run Data Collector as a service, use the following command to change the owner of the external directory and all files in the directory tosdc:sdc
:chown -R sdc:sdc /opt/sdc-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/sdc-extras/"
- When using the Java Security Manager, which is enabled by default, update the Data Collector security policy
to include the external directory as follows:
- In the Data Collector
configuration directory, open the security policy file,
$SDC_CONF/sdc-security.policy
. - Add the following lines to the
file:
For example:// user-defined external directory grant codebase "file://<external directory>-" { permission java.security.AllPermission; };
// user-defined external directory grant codebase "file:///opt/sdc-extras/-" { permission java.security.AllPermission; };
- In the Data Collector
configuration directory, open the security policy file,
- Restart Data Collector.
Setting Up for Cloudera Manager
Before you install external libraries for a Cloudera Manager installation, set up an external directory to store the libraries.
- In Cloudera Manager, select the StreamSets service and then click Configuration.
- On the Configuration page, in the
Data Collector Advanced Configuration Snippet (Safety Valve) for
sdc-env.sh field, add the STREAMSETS_LIBRARIES_EXTRA_DIR environment
variable and point it to the external directory, as
follows:
export STREAMSETS_LIBRARIES_EXTRA_DIR="<external directory>"
For example:
By default, the path isexport STREAMSETS_LIBRARIES_EXTRA_DIR="/opt/sdc-extras/"
/var/lib/sdc
. - Create the
/opt/sdc-extras/
directory on every node that runs Data Collector. - Grant the user who starts Data Collector ownership on the external directory added to every node.For example, if you use the default system user and group named
sdc
to run Data Collector as a service, use the following command to change the owner of the external directory and all files in the directory tosdc:sdc
:chown -R sdc:sdc /opt/sdc-extras
- When using the Java Security Manager, which is enabled by default, update the
Data Collector Advanced Configuration Snippet (Safety Valve) for
sdc-security.policy property to include the external directory as follows:
// user-defined external directory grant codebase "file://<external directory>-" { permission java.security.AllPermission; };
For example:// user-defined external directory grant codebase "file:///opt/sdc-extras/-" { permission java.security.AllPermission; };
- Restart Data Collector.