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.
Starting with StreamBase 3.7, feed simulations run in StreamBase
Studio are functionally equivalent to 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.
-
-bcount -
Changes the maximum number of tuples to buffer on each stream to count, when using the default load or a user-specifed distribution. This setting adjusts the enqueue client buffer size for each input stream. The default size is 100 tuples. Specify zero to disable buffering.
-
-Bcount -
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.
-
--legacy -
Force an on-the-fly conversion and execution of a feed simulation file created with StreamBase 3.5 or earlier.
-
--max-timesecs -
Limit the feed simulation run by time. Generates data appropriate for the schemas of the input ports of the running StreamBase Server, until
secsseconds have elapsed. -
--max-tuplescount -
Limit the feed simulation run by number of tuples sent. Generates appropriate data as above up to the number of tuples specified by
count. -
-pTCP-port -
Sets the port number for the StreamBase Server instance to connect with. This is useful when the server is
localhostand you only need to specify a non-default port, instead of specifying the full URI with the-uoption. The default port is10000.Note
The
-poption is not supported for StreamBase applications that have authentication enabled. -
-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
–soption is only valid when no.sbfsfeed simulation file is specified as an argument. -
-uuri -
Specifies the URI of the StreamBase Server to communicate with. The default is
sb://localhost:10000/.The URI can also be set using theSTREAMBASE_SERVERenvironment 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
-uoption 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. -
--version -
Prints version information and exits.
-
-xfactor -
Speeds up all streams by a factor specified by
. For example,factor–x 2runs the feed simulation at twice the default speed. -
-zseed -
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
FILES
The optional feed simulation file is If specified, sbfeedsim generates a load using 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
–uoption. 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
syslogorstderr. 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).
SEE ALSO
| sbfeedsim-old |
| syslog (3) |
To define feed simulations in StreamBase Studio (instead of using the sbfeedsim command), see the following topics:
| Using the Feed Simulation Editor |
| Feed Simulations View |
