Working with toolkit paths

If an application uses logic from a toolkit other than the SPL standard toolkit, the compiler must be instructed to find the toolkit.

Note: In order for a toolkit to be recognized by the compiler, it must already be indexed and have an up-to-date toolkit.xml file.
The sc command searches for toolkits using the SPL path. The SPL path is a list of colon : separated paths to one of the following items:
  • A toolkit directory
  • A directory of toolkit directories, which is equivalent to listing the toolkit directories individually
  • A toolkit list file

The SPL path can be specified by using one or more -t, --spl-path options, or if no -t options are specified, the value of the STREAMS_SPLPATH environment variable is used.

If multiple versions of a toolkit exist in the SPL path, the one with the highest version number is picked. If the versions are the same, the toolkit that appears earlier in the path is selected.

If the application uses multiple toolkits and there are inter-dependencies between the toolkits, then the highest toolkit version of each toolkit that satisfies all the inter-dependencies is picked. This version might not be the highest version of a toolkit.

Toolkit list file

The toolkit list file is an XML document that specifies a list of paths to one of the three SPL path items. The following example showcases how to specify each of the items:
<toolkitList xmlns="http://www.teracloud.com/xmlns/prod/streams/spl/toolkitList"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.teracloud.com/xmlns/prod/streams/spl/toolkitList
        toolkitListModel.xsd">
  <toolkit directory="path/to/toolkitDir" />
  <toolkit listFile="path/to/toolkitList.xml" />
  <toolkit directory="/absolute/path/to/dirOfToolkitDirs" />
</toolkitList>

Examples

Specifying a toolkit directory:
sc -M my.sample::Main -t "/storage/toolkits/exampletoolkit"
Specifying a directory of toolkits:
sc -M my.sample::Main -t "$STREAMS_INSTALL/toolkits"
Using STREAMS_SPLPATH:
export STREAMS_SPLPATH="$STREAMS_INSTALL/toolkits:/storage/toolkits/exampletoolkit"
sc -M my.sample::Main