IBM Streams 4.3.0

streamtool updateoperators

The streamtool updateoperators command lets you adjust a job configuration while the job is running in order to improve the job performance. In addition, you can view the current configuration of a job.

Usage

Read syntax diagramSkip visual syntax diagram
updateoperators

>>-+-----------------------+--+-------------------------+------->
   '-+- -d----------+--did-'  '-+- -i------------+--iid-'   
     '- --domain-id-'           '- --instance-id-'          

>--+-jobid----------------+--+-----------------------------+---->
   '- --jobname--job-name-'  '-+- -g----------+--file-name-'   
                               '- --jobConfig-'                

>--+----------------------------------------------------------+-->
   '--- -a --addJobResources----resource-count--+-----------+-'   
                                                |   .-,---. |     
                                                |   V     | |     
                                                '-,---tag-+-'     

>---- --force--------------------------------------------------->

>--+--------------------------------------------------------+--->
   '--- --parallelRegionWidth----parallel-region-name=width-'   

>--+---------------------------------+--+-------------------+--->
   '-+- -q--------------+--file-name-'  '-+- -U-----+--user-'   
     '- --out_jobConfig-'                 '- --User-'           

>--+-------------+--+-----------------+------------------------->
   '-+- -h-----+-'  '- --trace--level-'   
     '- --help-'                          

>--+-----------------------+------------------------------------>
   '-+- -v--------+--level-'   
     '- --verbose-'            

>--| Non-interactive tool options |----------------------------><

Non-interactive tool options

    (1)                                    
|--------+-----------------------------+------------------------|
         +- --embeddedzk---------------+   
         |               .-,---------. |   
         |               V           | |   
         '- --zkconnect----host:port-+-'   

Notes:
  1. The non-interactive tool options are not supported in the interactive streamtool interface.

Authority

You must have add and delete authority for the appropriate jobgroup_name instance object. By default, the DomainAdministrator and InstanceAdministrator roles have this authority. The user who submits the job also has this authority. For more information about access control lists, see the streamtool getacl and streamtool lsjobpermission commands.

Description

Use this operation to update a subgraph of a running job. You can increase or decrease the width of a parallel region. If you increase the width, you can optionally increase the number of resources that are assigned to the job.

You can also use this command with just the job ID or job name to view the current configuration of a job, for example, to see the job's fusion scheme or the current width of its parallel regions.

All affected operators and their associated processing elements (PEs) must be stopped before the update can be performed. You can use the --force option to automatically stop the PEs or you can stop the PEs manually before you submit this operation. The PEs are restarted after the update is complete.
Restrictions:
  • You cannot modify the parallel region width of a running job when the original job was submitted with the parallel region fusion (fusionType) parameter set to channelExlocation (prevent fusion across channels). You must resubmit the job with the fusionType parameter set to noChannelInfluence (default) or to channelIsolation.
  • Checkpointing is not supported in the parallel region, including collateral operators.
  • Consistent regions are not supported in the parallel region, including collateral operators.
Caveats:
  • The streamtool updateoperators command stops and restarts the operators in the parallel region and their associated PEs. This action can result in loss of tuples and operator state information.
  • The operation might take some time, depending on the number of operators that are affected.
  • Which operators are in each PE can change. The PE ID might not be consistent for the lifetime of an operator. You can use the capturestate command to determine the PE metrics or the streamtool lspes --long command to see the PE IDs.
  • Confirm with the application developer that changing the parallel region width will not interfere with any settings in the running application. For example, if the region includes sink operators that are matched with an externally partitioned system.

The operation fails without making any changes if the PEs in the parallel region cannot be placed because of incompatible placement constraints.

Options and arguments

-a, --addJobResources resource-count, tag
The number of resources to add. This property applies only if the value of instance.applicationResourceAllocationMode is Job.

You can optionally specify tags that must match the tags that are assigned to the resources. The tags that you specify apply to all of the resources that are added with this option. If you want to add resources with different sets of tags, you can use the --jobConfig option to specify a job configuration overlay with multiple adjustment sections. For information about how job configuration overlays work, see Job configuration overlays. For the list of the job configuration parameters that you can use with this command, see the Job configuration overlays reference.

-d, --domain-id did
Specifies the domain identifier.

If you do not specify this option, IBM® Streams uses the domain name that is set in the STREAMS_DOMAIN_ID environment variable. By default, that domain name is StreamsDomain. If you are using the interactive streamtool interface, it uses the name of the active domain for the current streamtool session or else it prompts you for the domain name.

The active domain for the current streamtool session is set every time that you successfully run a streamtool command with a -d or --domain-id option. Alternatively, you can run the streamtool domain command in the interactive interface.

--embeddedzk

Specifies to use the embedded copy of ZooKeeper. This option is not supported within the interactive streamtool interface.

If you are not using the interactive streamtool interface and you do not specify either this option or the --zkconnect option, IBM Streams uses the ZooKeeper connection that is associated with the active domain or the domain that is specified in the --domain-id option. IBM Streams determines which connection maps to the domain by using cached information about the domains. In this scenario, if the domain identifier is not unique in the IBM Streams configuration cache, the command fails.

--force
Specifies whether to automatically stop the PEs that need to be stopped. If you do not specify this option, you must manually stop the PEs before you submit this operation.
-g, --jobConfig file-name
Specifies the name of an external file that defines a job configuration overlay. You can use a job configuration overlay to set the job configuration when the job is submitted or to change the configuration of a running job. For information about how job configuration overlays work, see Job configuration overlays. For the list of the job configuration parameters that you can use with this command, see the Job configuration overlays reference.
-h, --help
Specifies to show the command syntax.
-i, --instance-id iid
Specifies the instance identifier.

If you do not specify this option, IBM Streams uses the instance identifier that is set in the STREAMS_INSTANCE_ID environment variable. By default, that instance identifier is StreamsInstance. If you are using the interactive streamtool interface, it tries to use an instance ID that you specified in a previous command. If no such value is found, the command uses the STREAMS_INSTANCE_ID environment variable. Alternatively, you can run the streamtool instance command in the interactive interface.

job-id
Specifies a job identifier.
--jobname job-name
Specifies the name of the job.
--parallelRegionWidth parallel-region-name=width
Specifies a parallel region name and its width. The parallel region name is the name of the logical operator that the @parallel annotation is applied to.
-q, --out_jobConfig file-name
Specifies the name of the output file in which the command writes the operator configuration information. For more information, see Job configuration overlays reference.
--trace level
Specifies the trace setting. The following valid levels are listed in order of increasing verbosity, which is to say that the first level in the list generates the least amount of information:
  • off
  • error
  • warn
  • info
  • debug
  • trace
The default value is off.
-U, --User user
Specifies an IBM Streams user ID that has authority to run the command.
-v,--verbose level
Specifies to provide more detailed command output. The verbosity level can be 0-3, where 0 disables detailed reporting and each increment provides more detailed output.
--zkconnect host:port

The name of one or more host and port pairs that specify the configured ZooKeeper servers. This option is not supported within the interactive streamtool interface.

If you are not using the interactive streamtool interface and you do not specify this option, IBM Streams tries to use:
  1. The --embeddedzk option
  2. The value from the STREAMS_ZKCONNECT environment variable
  3. A ZooKeeper connection string that is derived from cached information about the current domain.

Examples

The following command writes information about job 0, for example, the current parallel region widths, to the indicated file.
streamtool updateoperators 0
CDISC0217I Update operators was started on the my_instance instance. The instance is in the my_domain domain.
CDISC0216I The operator configuration results were written to the following file: my_job::UDP1_0_config.json.
The following information is contained in the output file.
{
  "results": {
    "parallelRegionsInfo": [
      {
        "name": "myParallelRegion1",
        "width": 3
      }
    ],
    "deploymentConfig": {
      "placementScheme": "balancedInstance",
      "fusionScheme": "automatic",
      "threadingModel": "notSpecified",
      "proposedOperatorsPerResource": 8
    }
  }
}
The following command sets the width of parallel region myParallelRegion1 to 5 for job 0.
streamtool updateoperators 0 --force --parallelRegionWidth myParallelRegion1=5
The following command sets the width of parallel region myParallelRegion1 to 8 and adds two resources to job 0.
streamtool updateoperators 0 --force --parallelRegionWidth myParallelRegion1=8 --addJobResources 2