streamtool chhost
Usage
chhost [-d,--domain-id <did>] [--noprompt]
[--force] [[-a,--add] | [-r,--remove] | [--replace]] --tags
<tag>,... [-U,--User <user>] [-h,--help] [--trace
<level>] [-v,--verbose <level>] [--zkconnect
{<host>:<port>},... | --embeddedzk] <hostname>
... | <hostname>,...
The streamtool chhost command changes the tags that are associated with static Streams resources in a domain.
Authority
You must have read authority for the config domain object and read, write and search authority for the hosts domain object. By default, the DomainAdministrator role has this authority. For more information about access control lists, see streamtool getdomainacl.
Description
Tags are a mechanism for differentiating and identifying resources that have different physical characteristics or logical uses. Resources can have any number of tags. Tags are case-sensitive strings with a letter optionally followed by alphanumeric or underscore characters.
Streams defines the following tags:
- application
- Specifies that the resource can run Streams applications.
- audit
- Specifies that the resource can run the logging service.
- authentication
- Specifies that the resource can run the authentication and authorization service.
- jmx
- Specifies that the resource can run the management API service.
- management
- Specifies that the resource can run any of the Streams domain and instance management services.
- sws
- Specifies that the resource can run the web management service.
- view
- Specifies that the resource can run the view service.
You can define extra tags that meet your needs.
By default, this command adds the specified tags to one or more
static Streams host resources. The tag is created with a blank
description and a resource type of streams
. This
command does not apply to resources that are obtained from an
external resource manager.
If the instance is started and the tag is used to select a resource for an instance (for example in a --numresources specification), streamtool chhost commands with the --remove and --replace options fail. Likewise, the command fails if a job is running on an instance that used the tag to determine the placement of the processing elements.
Options
- -a,--add
- Specifies to add tags to the hosts. If you do not specify otherwise, the command uses this option.
- -d,--domain-id <did>
- Specifies the domain identifier.
If you do not specify this option, 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, Streams uses the ZooKeeper connection that is associated with the active domain or the domain that is specified in the --domain-id option. 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 Streams configuration cache, the command fails.
- --force
- Specifies to force the removal of the tag from the resource, even if the tag is in use by an application.
- -h,--help
- Specifies to show the command syntax.
- --noprompt
- Specifies to suppress confirmation prompts.
- -r,--remove
- Specifies to remove the designated tags from the hosts.
- --replace
- Specifies to replace the tags with new tags.
- --tags <tag>
- Specifies a list of tags.
- --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
off
. - -U,--User <user>
- Specifies an 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
, where0
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, Streams tries to use:
- The --embeddedzk option
- The value from the STREAMS_ZKCONNECT environment variable
- A ZooKeeper connection string that is derived from cached information about the current domain.
Arguments
- hostname
- Specifies the host name or IP address for a host in the domain.
Examples
The following example adds the tag "test" to the "host1" resource for the "StreamsDomain" domain:
[streamtool <bsmith@mydomain.streams>] chhost --add --tags test host1 CDISC0102I The following tag was defined for the StreamsDomain domain: test. CDISC0094I The following tags are being added to the host1 resource: [test]. The resource is allocated to the StreamsDomain domain.