Streams resource tags

IBM Streams resource tags are a mechanism for differentiating and identifying resources that have different physical characteristics or logical uses.

Streams resources can have any number of resource tags. Resource tags are case-sensitive strings that contain a letter optionally followed by alphanumeric characters.

Resource tags can be used for different reasons. You can use a resource tag to define information about the resource (for example, image, CPU, and memory). You can also use a resource tag to direct the scheduler where to place processing elements.

To use tags, you must create a custom application resource template where the name of the template corresponds to the name of the resource tag, and specify the name of the custom application resource template configuration map when you provision an instance. If no resource tags are specified, the default application resource template (application.yaml) is used.

Using resource tags

After resource tags are defined, they can be used to customize the deployment of a job by either of the following methods:

  • Specifying the resource tags by creating a hostpool in the IBM Streams Processing Language application. For more information, see hostPool.
  • Specifying the resource tags in a poolPlacementGroup in a job configuration overlay file. For more information, see Job configuration overlays reference.

You must create an application resource template to match the combination of resource tags that are used to request resources. You can specify one or more resource tags on the request. The template name that will be used is the alphabetically sorted list of resource tags with hyphens separating the resource tag names. The application resource templates can be in either YAML or JSON format. The file must have the corresponding extension to indicate the format of its contents.

Examples:
Request resource tags Application template name
No resource tags specified application.yaml
red red.yaml
blue blue.yaml
blue,red (two resource tags blue and red) blue-red.yaml

Assigning resource tags when you submit a job

You can add new resource tags by providing resource definitions for them in a custom configuration map. You can also override the default definition of an existing resource tag (for example, the application resource tag) by including a new definition for it in the application template configuration map. To see which resource tags, and valid combinations of resource tags, are available for use by jobs, use the streamtool lsapptpls command. The --long option on lsapptpls shows you the contents of the application resource template. For more information about streamtool commands, see Streamtool commands.