streamtool mkhostfile

Usage

mkhostfile {[-f,--file <file-name>] | [-a,--application <sab-pathname>]} [-h,--help] [--trace <level>] [-v,--verbose <level>] [--zkconnect {<host>:<port>},... | --embeddedzk] <generated-host-file>

The streamtool mkhostfile command creates a host file from a collection of application files that are generated by the SPL compiler.

Authority

You do not need any authority to run this command.

Description

A stream processing application contains specifications about resource requirements. If the resource requirements for an application are not satisfied, the job submission fails. You can use the streamtool mkhostfile command to generate a host file that is based on the resource and host pool specifications in a stream processing application.

The list of applications, which you specify with the -f or --file pathname option, can have the same format as the file that you provide to the streamtool submitjob command. If any submission parameters are present in the file, they are ignored.

You can use the generated host file as input to the streamtool mkinstance and addhost commands.

The output of this command specifies the minimum instance configuration information necessary to support the stream processing application. The output does not, however, consider the application placement constraints such as

exlocate

and

hostisolation

config placements. You might need to adjust the quantity of resources to satisfy the real-time placement constraints. When you submit the job, error messages provide advice about the adjustments that are required.

Options

-a,--application <sab-pathname>
Specifies the path name for the application bundle file. If you do not specify an absolute path, the command seeks the file in the directory where you ran the command. Alternatively, you can specify the path name for the application description language (ADL) file if the application bundle file exists in the same directory.
--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.

-f,--file <file-name>
Specifies the name of an input file that contains a list of application bundle files. You can specify file names that have fully qualified paths or paths that are relative to the current directory. The input file must contain one file name per line.
-h,--help
Specifies to show the command syntax.
--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.
-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, 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.

Arguments

generated-host-file
Specifies the name of the host file that is generated by the command. If you do not specify a relative or fully qualified path, the command creates the file in the current directory.

Examples

The following example shows the commands for generating a host file for the HostConstraint sample application:

$ cd $STREAMS_INSTALL/samples/spl/feature/HostConstraint
$ make
$ streamtool mkhostfile -a output/sample.HostConstraint.sab hostfile.gen
CDISC0177I InfoSphere Streams is processing the sample::HostConstraint application
from the application that is stored in the ...sample.HostConstraint.sab file path.
CDISC0104I The following host file was created: hostfile.gen.

The hostfile.gen file contains the following information:

# ----------------------------------------------------------------------
# InfoSphere Streams is processing the sample::HostConstraint application
from the application that is stored in the ...sample.HostConstraint.sab file path.
# ----------------------------------------------------------------------

# Host pool '$default':
--numresources 4[SHARED]