Primitive operator artifacts

Each primitive operator is stored in a directory whose name follows the format ([:alnum:]+\.)*[:alnum:]+ where the last part ([:alnum:]+) is the operator name.

For instance, for an operator with name Delay, some valid directory names are Delay, spl.utility.Delay, and spl.Delay. Any prefix that comes before the operator name is taken as the namespace, excluding the trailing period. Furthermore, additional parent directories of the form ([:alnum:]+\.)*[:alnum:]+ can appear and are taken as part of the namespace. For instance, all the following operator directory names are associated with the spl.utility namespace spl/utility.Delay, spl.utility/Delay, spl/utility/Delay, and spl.utility.Delay. This flexibility allows the developers to decide on the number of levels they want to manage in the directory structure. For example, com.ibm.spl/file/adapter is preferable to both com/ibm/spl/file/adapter (too deep) and com.ibm.spl.file.adapter (no hierarchy). For a namespace, only one path is allowed per toolkit. It is an error to use both spl/utility and spl.utility in the same toolkit.

The operator directory contains three types of artifacts.
  • The operator model is an XML file that describes syntactic and semantic properties of the operator. It is authored by the developer and is mandatory. See Developing C++ primitive operators for details. The operator model is named as <oper-name>.xml, such as Delay.xml.
  • The code generator templates are the header and the implementation files that contain the operator logic. They are authored by the developer and are mandatory. They are named as <oper-name>_h.cgt and <oper-name>_cpp.cgt, such as Delay_h.cgt and Delay_cpp.cgt.
  • The code generators are the code generators, in the form of Perl modules, which are derived from the code generator templates. They are created either as part of the toolkit indexing by the spl-make-toolkit program or by calling the spl-make-operator script as described in Developing C++ primitive operators. They are named <oper-name>_h.pm and <oper-name>_cpp.pm, such as Delay_h.pm and Delay_cpp.pm.