Creating partition colocation or exlocation groups

You can specify how the operators in an application are grouped together into processing elements (PEs). You can group operators together in a PE (also called a partition), or prevent operators from being grouped with other operators.

About this task

Creating partition colocation groups can enable related operators to communicate more efficiently, while creating partition exlocation groups can prevent resources from being overloaded.

You can specify partition location constraints from the IBM® Streams Console 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.

To create a partition colocation group, you must create one or more LocationGroup entries within the partitionColocationGroups parameter. Each LocationGroup entry defines a partition colocation group.

All of the members of a partition colocation group are placed in the same PE at run time. When you create a partition colocation group, consider the requirements of the operators. For example, you might want to place operators with complementary requirements in a partition colocation group.

To create a partition exlocation group, create one or more LocationGroup entries within the partitionExlocationGroups parameter. Each LocationGroup entry defines a partition exlocation group.

The members of a partition exlocation group are placed in different PEs at run time. Typically, you create a partition exlocation group to ensure that:
  • Operators that consume a lot of system resources are not placed in the same PE.
  • Operators in a highly available environment run on different resources to reduce the likelihood that multiple operators will be impacted if a resource 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.