IBM Streams 4.2

Creating host co-location and ex-location groups

You can specify how the operators in an application are grouped on the hosts in the instance. You can group operators together on a host, or you can prevent operators from being grouped with other operators.

About this task

Creating host co-location groups can enable related operators to share the same host-scoped resources, such as files on the local file system. Creating host ex-location groups can prevent resources from being overloaded.

You can specify host location constraints from the IBM® Streams Console, IBM Streams Studio, or the streamtool submitjob command. However, if you use the streamtool submitjob command, you must use a job configuration overlay file to specify these settings. A job configuration overlay file is optional if you use IBM Streams Console or IBM Streams Studio.

To create a host co-location group, you must create one or more LocationGroup entries within the hostColocationGroups parameter. Each LocationGroup entry defines a host co-location group.

All of the members of a host co-location group are placed on the same host at run time. Additionally, when you create a host co-location group, you should consider the requirements of the operators. For example, you might want to place operators with complementary requirements in a host co-location group to prevent IBM Streams from creating a more restrictive composite requirement set.

To create a host ex-location group, you must create one or more LocationGroup entries within the hostExlocationGroups parameter. Each LocationGroup entry defines a host ex-location group.

The members of a host ex-location group are placed on different hosts at run time. Typically, you create a host ex-location group to ensure that:
  • Operators that consume a lot of system resources are not placed on the same host
  • Operators in an HA environment run on different hosts to reduce the likelihood that multiple operators will be impacted if a host goes down
Each LocationGroup entry includes the following information:
name
The name to use for the group. If the name matches the name of a group that is defined in the application bundle file, this group replaces the group in the bundle.

If you do not specify a name, IBM Streams generates a name.

members
Specify a list of the operators that you want to include in the group. (Operators can be in more than one group.)

To specify which operators you want to include in the group, you must specify the nameSpec of the operators.

You can use the nameSpec parameter to specify the name of a single operator or you can specify a group of operators:
  • To specify a single operator to include, specify the name of an existing operator instance in the application after UDP transformations.
  • To specify a group of operators to include, use an asterisk (*) as a wildcard character. You can specify 0 or more wildcard characters. For example:
    • Enter myParallelRegion.myOperator[*] to include all of the channels of the parallel region
    • Enter MyComposite.firstComposite.* to include all of the operators in the composite region

If you do not specify a list of operators and there is a location group with the same name in the application bundle file, the group is removed from the application bundle file.