IBM Streams 4.2

Application directory layout

The application directory is where the compilation happens, that is, it is the current working directory where you issue the sc compiler command.
As a result of the compilation process, the sc command creates a subdirectory that, by default, is called output, which contains the application bundle file. This directory is called the output directory.
Note: When you run your application, the application directory at run time is in a directory hierarchy that is determined by the domain where it runs.

If your application writes data, you must define a data directory either at compile time, with the --data-directory option or submission time. There is no "default" data directory. The compiler does not create a data directory. The data directory must exist before running the application. The data directory is the root of relative paths for data files, for example, files that are specified in the file parameter of FileSource or FileSink.

The sc command automatically indexes the toolkit and inserts it into the SPL path as the first item. As an example, consider the following application directory layout.
/+ MyAppDir                     # application directory
  /+ info.xml                   # name, version, dependency information
  /+ my.sample                  # namespace directory
    /+ FooBar.spl               # .spl file with the main composite FooBar
    /+ FooBarHelper.spl         # a second .spl file containing helpers
Compiling the FooBar main composite by using the sc -M my.sample::FooBar command in the MyAppDir application directory results in the following layout.
/+ MyAppDir                      # application directory
  ...                            # authored files, as before
    /* output                      # generated artifacts
     /* my.sample.FooBar.adl     # generated application description file
     /* my.sample.FooBar.sab     # generated application bundle file
     /* bin                      # generated PE binaries
     /* build                    # generated build artifacts
     /* src                      # generated source artifacts
     /* etc                      # configuration artifacts
     /* toolkits                 # root of copied toolkits
  /* toolkit.xml                 # generated toolkit index

The generated artifacts are marked with a * to differentiate them from the authored artifacts that are marked with a +. The application bundle file uses . as a name separator in place of ::. In SPL, the :: is used to separate the namespace qualifier from the operator or operator instance name, as in my.sample::FooBar. The absence of :: in the application bundle file is due to the restrictions on the list of characters that might appear in a file name in certain file systems.