Toolkit directory files and structure

Toolkit directories are structured identically to application directories. The only difference between the two is that toolkit directories do not contain any main composite operators.

Since toolkits are independent of applications, it is important to use namespace directories and an info.xml file with at least a name and a version.

Toolkit index file

A toolkit.xml file is a generated index of all types, functions, and operators in a toolkit. This file is essential for making a toolkit's artifacts available to applications or other toolkits.

A toolkit is not usable without an up-to-date toolkit.xml file, and the SPL compiler may error if it detects the toolkit.xml is not up to date.

To generate or update the toolkit.xml file, use the spl-make-toolkit command. For more details, see Indexing a toolkit.

Examples

Toolkit with primitive C++ operator
toolkitdir/
├── info.xml
├── toolkit.xml                    # Generated artifact
└── my.namespace/
    └── MyC++Operator/
        ├── MyC++Operator.xml
        ├── MyC++Operator_h.cgt
        └── MyC++Operator_cpp.cgt
Toolkit with SPL and C++ native functions
toolkitdir/
├── info.xml
├── toolkit.xml            # Generated artifact
├── impl/
│   ├── lib/
│   │   └── libmyutils.so  # Generated artifact
│   ├── include/
│   │   └── myutils.h
│   └── src/
│       └── myutils.cpp
└── my.namespace/
    ├── Utils.spl
    └── native.function/
        └── function.xml
Toolkit with primitive Java operator
toolkitdir/
├── info.xml
├── toolkit.xml                        # Generated artifact
├── etc/
│   └── broker.properties
├── lib/
│   └── third-party.jar
├── impl/
│   ├── java/
│   │   └── src/
│   │       └── my/
│   │           └── namespace/
│   │               └── Operator.java
│   └── lib/
│       └── myoperator.jar             # Generated artifact
└── my.namespace/
    └── MyJavaOperator/
        └── MyJavaOperator.xml         # Generated artifact
Toolkit with primitive Python operator
toolkitdir/
├── info.xml
├── toolkit.xml                   # Generated artifact
├── data/
│   └── models.json
├── impl/
│   └── bin/
│       └── MyPythonOp.py
└── my.namespace/
    └── MyPythonOperator/
        └── MyPythonOperator.xml