IBM InfoSphere Streams Version 4.1.0

Lookup Manager command file

The command file, which has the .cmd extension, has one or more command lines, each of which includes one command type. By default, it is stored in the cmd subdirectory in the input folder of the Lookup Manager job. The path to the input folder can be passed to the application when you submit the job by using the lm.commandsDirectory parameter.

The Lookup Manager supports the following types of commands in the command file:
  • init: Creates new shared memory segments.
  • update: Updates the contents of existing shared memory segments.
  • delete: Removes the contents of shared memory map elements that are defined by key attributes. This command is supported only for CSV input files.
Lines are grouped into the following two semicolon-separated columns:
  • A mandatory column (<command>) that identifies the command type.
  • An optional column (<segment>) that identifies the repository segment name. This segment is configured in the LookupMgrCustomizing.xml file.

At run time, you can decide which available data source prepares the repository. Only when both sources, CSV files and database, are enabled can you select the file source processing by prefixing file_ or postfixing _file to the <command> in the command file. For example, you can write file_update to update the shared repository with data residing in CSV files.

The delete command sets the file request automatically. The database cannot define pre- or postfixes for the command. For example, the initialization command for a database must always be init. Only one shared memory segment can be addressed per command line as <segment>. If you need more then one segment, you must define additional lines in the command file.

A command affects all applications that are defined in the LookupMgrCustomizing.xml file that define the customizing settings.

You can specify the path to the input folder by using the lm.commandsDirectory parameter when you submit the job.

The following figure shows an example of a command file, init_all.cmd, in the ./data/in/cmd folder. The first line contains the init command that is processed on the DimMaster1 lookup segment. The second line triggers an update command on the DimMaster1 lookup segment for all known applications that use a CSV file as source. In this example, the database and CSV files are used in parallel as data sources for the lookup repository. Thus the _file postfix is required to trigger the read processing from CSV file. The last line starts the update command on all known lookup segments for all known applications.

Commands batch file