IBM InfoSphere Streams Version 4.1.1

Customizing the Lookup Manager application

To customize the Lookup Manager application, adapt the LookupMgrCustomizing.xml file and, if your enrichment data is read from a database, the connections.xml file.

About this task

The Lookup Manager application takes care that the enrichment data is distributed to all hosts on which ITE applications want to access it. The enrichment data is stored in a database, in files or in a database and files. While creating the Lookup Manager application you already enabled one or both source systems.

If your ITE applications do not enrich the input tuples, the Lookup Manager application is not required at all.

The customization of the Lookup Manager application does not require any code changes but requires that you customize the mapping between the source data columns and the tuple attributes you use in your application or applications. If your enrichment data is stored in a database and your application retrieves it directly from the database, you must also customize the connections.xml document.

The customization of the connections.xml document that is in the project directory, is described in the database toolkit documentation (Reference > Toolkits > Specialized toolkits > com.ibm.streams.db). For more information about the procedure to connect the connections.xml file to the LookupMgrCustomizing.xml file, see Connecting the connections.xml and the LookupMgrCustomizing.xml files.

This procedure describes the steps to customize the LookupMgrCustomizing.xml file. In the LookupMgrCustomizing.xml file you define shared memory segments, stores, and streams schemas as well as the mapping from the source to the SPL streams schemas. When you compile the Lookup Manager application, the content of the LookupMgrCustomizing.xml file is used to generate parts of the SPL source code.

For more information about the allowed elements and values in the customization file, see the etc/LookupMgrCustomizing.xsd XSD file in your project directory.

Procedure

  1. Open the LookupMgrCustomizing.xml file, in the root directory of the Lookup Manager project, with an XML or text editor.
  2. Repeat the following steps for each ITE application that requires access to enrichment data.

    1. Add an Application element and set the ApplicationNamespace attribute to the unique name space of the ITE application. The following figure shows an example of two applications:
      Lookup Manager customization - application namespace
    2. Add a CommandMappings element and define for each shared memory segment the allowed commands. The supported commands are init, update, and delete.

      Lookup Manager application - customizing the command mapping

    3. Add a SegmentCustomizing element and define the segments and stores that hold the enrichment data. Specify for each segment the logical and physical name as well as the maximum segment size. Specify for each store the key and the values as well as their types.

      Lookup Manager application – segment customization

    4. Add a StreamsSchemas element and define the streams schemas. Each schema must be identical to the layout of the enrichment data in the database table or CSV file sources. A streams schema is connected to a shared memory segment in the SegmentCustomizing section with the segment name. The same source data can feed several stores in a shared memory segment.

  3. Save your LookupMgrCustomizing.xml file.

  4. Build your Lookup Manager application.

Connecting the connections.xml and the LookupMgrCustomizing.xml files
Some settings in the connections.xml file, which is required by the com.ibm.streams.db toolkit and its operators, must correlate with Lookup Manager parameters and with settings in the LookupMgrCustomizing.xml file. {Lookup Manager application – connecting the connections.xml and LookupMgrCustomizing.xml files} Procedure: Set the name attribute of the connection_specification element to the value of the lm.db.connectionName parameter. For example, SAMPLE as shown in the below figure.