Configuring the TEDA toolkit

To use the operators and functions that are defined in the TEDA toolkit, you must configure the SPL compiler to find the toolkit root directory.

Before you begin

Install and configure Streams.

Procedure

  1. To configure the SPL compiler to find the root directory of the toolkit, use one of the following methods:
    • Set the STREAMS_SPLPATH environment variable to the root directory of a toolkit or toolkits by using a colon (:) as a separator, for example:
      
      export STREAMS_SPLPATH=$STREAMS_INSTALL/toolkits/com.teracloud.streams.teda
      
    • When you compile your SPL applications, specify the -t or --spl-path command parameter on the sc command. For example, when you compile an SPL main composite called MyMain, specify the toolkit:
      
      sc -t $STREAMS_INSTALL/toolkits/com.teracloud.streams.teda -M MyMain
      
      Note: These command parameters override the STREAMS_SPLPATH environment variable.
  2. Optional: When you develop your SPL application, complete one of the following steps to add a use directive:

    • Add the following clause in your SPL source file:
    
    use com.teracloud.streams.teda.parser.binary::*;
    
    • Specify a use directive for an individual operator by replacing the asterisk (*) with the operator name, for example:
    
    use com.teracloud.streams.teda.parser.binary::ASN1Parse;
    
  3. Optional: To make the commands in the TEDA toolkit accessible from any working directory, run the following command:
    
    export PATH=$PATH:$STREAMS_INSTALL/toolkits/com.teracloud.streams.teda/bin