sbfeedsim
StreamBase Feed Simulator — starts the StreamBase Feed Simulator.
DESCRIPTION
The sbfeedsim command starts the StreamBase Feed Simulator, which connects to a running StreamBase application and submits data to it. Use this tool to test the validity and performance of your application.
As with most StreamBase command-line tools, you can specify the StreamBase Server to
communicate with by using -p
or -u
arguments. In the absence of these arguments, sbfeedsim connects to the server specified in the
STREAMBASE_SERVER
environment variable. In the absence of
this variable, sbfeedsim attempts to
connect to the default StreamBase URI, sb://localhost:10000
.
If you omit the optional feedsim-file.sbfs
argument,
sbfeedsim connects to the specified or
default server, determines the schema expected by the input stream of the running
StreamBase application, and generates default data for each data type in the schema.
If the running application has more than one input stream, sbfeedsim determines the expected schema for each
stream and generates sample data for all fields in each stream. You can use the
-s
option to narrow the list of input streams for which
sample data is generated.
sbfeedsim can also populate input streams according to a user-specified statistical distribution, or via a data file that contains data you created to test various streaming scenarios. The data file is typically in comma-separated value (CSV) or tab-delimited format. With sbfeedsim, you have control over tuple values and the input rate of generated data.
Running a feed simulations in StreamBase Studio is functionally equivalent to running
one with the sbfeedsim command. If you
have feed simulation files created and saved with StreamBase 3.5 and earlier, use the
sbfeedsim-old command instead, or use the -c
option to upgrade those files to the current format.
OPTIONS
- -a
-
Sets the data rate for this feed simulation to run as fast as possible.
-
-b
count
-
Changes the maximum number of tuples to buffer on each stream to count, when using the default load or a user-specified distribution. This setting adjusts the enqueue client buffer size for each input stream. The default size is 100 tuples. Specify zero to disable buffering.
-
-B
count
-
Changes the maximum number of tuples to buffer when using a data file or JDBC data source. The default buffer in these cases is 40,000 tuples.
-
-c, --convert
-
Converts a legacy feed simulation file (saved with StreamBase 3.5 and earlier) to the current feed simulator XML format, and prints the result to standard output. You can redirect the converted results to a file, as in the following example:
sbfeedsim -c MyOldFeedsim.sbfs > MyNewFeedsim.sbfs
- -F
-
When using a data file or JDBC data source, completely prefill the tuple buffer before sending the first tuple.
-
--force
-
Run this feed simulation even if warnings occur during application compatibility validation.
-
-h, --help
-
Displays usage text, then exits.
-
-J
jvm-option
-
Specifies a system property setting or other JVM argument to be passed to the JVM that runs this sbfeedsim command. Use this option to specify temporary settings that affect only the current invocation of sbfeedsim. You must specify multiple
-J
options to specify multiple JVM arguments.A space between the
-J
and its argument is optional. Use the full option syntax forjvm-option
that you would use at the Java command line, including the initial hyphen. For example, specify-J-Dstreambase.log-level=2
to increase the log level for this invocation of sbfeedsim.Your
jvm-option
argument might require surrounding quotes, depending on the characters it contains and the shell you are using. However, do not use quotes to escape the spaces between separate JVM arguments; instead use separate-J
options. For example:-J-Xms512M -J-Xmx2G
-
--legacy
-
Force an on-the-fly conversion and execution of a feed simulation file created with StreamBase 3.5 or earlier.
-
--max-time
secs
-
Limit the feed simulation run by time. Generates data appropriate for the schemas of the input ports of the running StreamBase Server, until
secs
seconds have elapsed. -
--max-tuples
count
-
Limit the feed simulation run by number of tuples sent. Generates appropriate data as above up to the number of tuples specified by
count
. -
-p
TCP-port
-
Sets the port number for the StreamBase Server instance to connect with. This is useful when the server is
localhost
and you only need to specify a non-default port, instead of specifying the full URI with the-u
option. The default port is10000
.Note
The
-p
option is not supported for applications that have StreamBase authentication enabled (because there is no way to specify a username and password) or in conjunction with the multiple URI syntax. -
-q
-
Does not display tuples (quiet).
-
-s
streamname1
,streamname2
,... -
Specifies a comma-separated list of input stream names in the application running on the connected StreamBase Server. The
-s
option is only valid when no.sbfs
feed simulation file is specified as an argument. -
-u
uri
-
Specifies the URI of the StreamBase Server to communicate with. The default is
sb://localhost:10000/.
The URI can also be set using theSTREAMBASE_SERVER
environment variable. See the sburi page of the Reference Guide (or see sburi(5) at the UNIX shell prompt) for a discussion of the URI format and its shortcuts.Note
The sbfeedsim command's
-u
option accepts a comma-separated list of URIs, where each URI specifies a different StreamBase Server in a high availability cluster. See the Multiple URI Syntax for HA Scenarios page in the Reference Guide for details. -
-x
factor
-
Speeds up all streams by a factor specified by
. For example,factor
-x 2
runs the feed simulation at twice the default speed. -
-z
seed
-
Specify a long value for
to be used as the random value generator's seed, when automatically generating values for each field in each stream. Without this option, sbfeedsim uses zero as the seed. The values generated by sbfeedsim are the same for a given seed value, which makes tests with the same seed value repeatable. Specify a seed value other than zero to generate a different set of values than the default setting.seed
-
--version
-
Prints version information and exits.
FILES
The optional feed simulation file is
If specified, sbfeedsim generates a load using the specifications
in that file.
file
.sbfs.
If you create a data file to contain sample data for testing purposes, it is typically a comma-separated or tab-delimited file.
ENVIRONMENT
-
STREAMBASE_SERVER
-
Optional. Contains the URI for a StreamBase Server instance. Use this variable to set a default StreamBase URI for StreamBase commands that take the
-u
option. If set, commands use the URI in this variable, overriding their built-in default URI, which issb://localhost:10000.
If this variable is set, you must use the-u
option to communicate with any server other than the one specified in this variable. See the sburi page in the Reference Guide for more on StreamBase URIs. -
STREAMBASE_RETITLE_TERMINALS
-
Optional. If set to any value, StreamBase command-line utilities assign a terminal window title to match the name of the executable being run. By default terminal titles are not affected.
-
STREAMBASE_LOG_LEVEL
-
Optional. Sets the minimum severity of messages that StreamBase writes to logging output. Default is 0, which gets NOTICE level messages and higher. Reasonable values are -1 (which disables NOTICE messages and shows only WARN, ERROR and FATAL messages), 1 (which adds INFO messages to the standard messages), and 2 (which adds DEBUG messages).
-
CLASSPATH
-
When you have saved a feed simulation file that specifies data generation from a JDBC data source, you can run that file with sbfeedsim. For this to work, the JDBC driver JAR file must be in the classpath. You can set the
CLASSPATH
environment variable, or use another standard classpath setting method. If you use theCLASSPATH
environment variable, append to the existing classpath the full path to the JDBC JAR file. See Feed Simulation with a JDBC Data Source for further information.