jsbc (deprecated)
StreamBase Client — starts the StreamBase Client, Java implementation
DESCRIPTION
Note
This command is deprecated in 11.2 and is expected to be removed from future releases.
jsbc runs a Java implementation of the StreamBase client utility, which lets you send requests to a running streaming node. For example, the jsbc list streams command requests the server to list available streams.
OPTIONS
With a few exceptions, the jsbc command has some notable differences from other non Java client commands. The key differences are:
- No space after -u or -p
-
For jsbc, there must be no space between
-u
and the following URI, and no space between-p
and the following port number:jsbc -usb://localhost:10000 status jsbc -p9900 status
Important
When communicating over an SSL connection, substitute
sbs:
forsb:
- -J option supported
-
The jsbc command accepts the
-J
option.-J
jvm-option
-
Specifies a system property setting or other JVM argument to be passed to the JVM that runs this jsbc command. Use this option to specify temporary settings that affect only the current invocation of jsbc. 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 jsbc.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
To use jsbc to communicate over SSL connections, you need to configure access to the local trustStore for command-line Java utilities in this manner, substituting actual filenames and passwords (line breaks added for readability):
jsbc -J-Djavax.net.ssl.trustStore=C:/Temp/client.keystore -J-Djavax.net.ssl.trustStorePassword=cl123abc -J-Djavax.net.ssl.keyStore=C:/Temp/client.keystore -J-Djavax.net.ssl.keyStorePassword=cl123abc -usbs://localhost:10002;user=bob;password=secret deq OUT
- Use sbs instead of sb in URI when running with a proxy server
-
For example, the following command connects to a proxy using Encrypted StreamBase Network Protocol over
sbs
:jsbc -u"sbs://proxyhost:port;user=theuser;password=123abc" enq InputStream
- No arguments for -h and --help
-
The jsbc command's
-h
and--help
options do not take subcommand arguments.
COMMANDS
- status [--verbose] [--operators [containerName]]
-
Displays a one-line summary of current information about the specified StreamBase server.
- enqueue [
OPTIONS
] [stream-name
] -
Reads data from
stdin
and enqueues it tostream-name
. stream-name
-
The name of the stream on which to enqueue data.
-d
delim
-
Use
delim
(a single character, or the literal stringtab
) as a field separator. The default field separator is a comma. -q
quotechar
-
Use
quotechar
(a single character) as a quotation mark. The defaultquotechar
is a double quote. -n
null-string
-
Consider a field to be null when
null-string
is specified as a value. The default string to indicate a null field isnull
. -f
field1
,field2
...
-
Specify the order of fields in the input. The first column in the input is
field1
in the input stream, and so on. This option is much the same only valid when a stream name is provided. -b
size
-
Use
size
to indicate the number of tuples to buffer. The default is no buffering. --json
-
Output tuples in JSON format.
--timestamp[=<FORMAT_STRING>]
-
Include output arrival timestamp. Default format is
YYYY-MM-dd HH:mm:ss.SSS[+/-]XXXX
- dequeue [
OPTIONS
] [stream-names...
] -
Dequeues data from one or more streams to
stdout
. This command can be abbreviated as deq. stream-names
-
The names of streams from which to dequeue. The default is to dequeue from all output streams (that is, all streams that do not feed into the input ports of other operators).
- --all
[=input|=output]
-
Dequeue all streams at target container (or only input, output streams).
- --all-containers
[=input|=output]
-
Dequeue from all containers (or only input, output streams).
- --all
-d
delim
-
Use
delim
(a single character, or the literal stringtab
) as a field separator. The default field separator is a comma. -q
quotechar
-
Use
quotechar
(a single character) as a quotation mark. The defaultquotechar
is a double quote. -n
nullstring
-
Output null values as a nullstring.
-v
-
Output human-readable tuples, showing the stream name, a tuple ID number, then each field name and value. By default, tuple IDs are all 0.
--json
-
Output tuples in JSON format.
--header
-
Write a header line at the beginning of the output that shows each field name, as shown in example below:
key,city,papers 3,Boston,"[The Globe,void]" 2,Paris,"[Le Monde,Le Figaro,La Croix]"
- list [-a] [-c] [-m] [-C
container-name
]type
... -
Lists entities (containers, streams, schemas and components) at the target server.
-a
-
Produces a list of all streams, containers, schemas, and tables in the connected application, including intermediate streams, but not including any system streams. The
-a
list option presumes the-c
option, and always shows container names. -c
-
Includes container names as a prefix to the entity names in the resulting list.
-m
-
Includes module references. Modules can be explicitly referenced in the application, or referenced implicitly by StreamBase. That is, when a component runs in multiple parallel regions, StreamBase creates an implicit module for each running instance.
-C
container-name
-
Lists the streams and operators for the specified container.
type
-
The
type
argument can be in the formoperator:
whereoperator-type
operator-type
is the name of a StreamBase operator as shown in the Studio Palette view. - describe
name
[name
...] -
Returns the EventFlow XML description of one or more components in the running application. For streams, the command returns the schema of the specified streams. Specify each component name separated by spaces. You can use container-qualified and module-qualified names. You cannot specify a Query Table as a
name
, but you can enter the name of a Query operator connected to that table, in which case the returned description includes the query plan for that operator.If the name you specify is the name of a Module Reference, the command returns
module-reference name="
, because the describe command cannot look inside a Module Reference to describe the module components inside. If the name you specify is the name of a Decision Table operator (which is implemented internally as a Module Reference), the command returns:name
"module-reference name="
name-of-decision-table
" refers-to="decision-table" - checkLicense
<feature-name>
-
Prints whether the server license has the given feature enabled.
- getDynamicVariable
dynvar-path
-
The argument is a StreamBase path to a dynamic variable in the form
container.module.dynvar-name
. - setDynamicVariable
dynvar-path
-
Sets the value of a dynamic variable.
- readTable
[-l/--limit <limit> |-a/--all] [-w/--where predicate] <table-path>
-
Retrieve and print rows from the table.
-l/--limit <limit>
-
Set limit on rows. Use
--all
for no limit, default is 10. -w/--where predicate <table-path>
-
Set the predicate which rows must match.
-h/--header
-
Print a header row.
-j/--json
-
Output rows as JSON.
ENVIRONMENT
STREAMBASE_SERVER
-
Optional. Contains the URI for a StreamBase Server instance. Use this variable to set a default StreamBase URI for certain StreamBase commands that take the
-u
option. If set, commands use the URI in this variable.
If this variable is set, you must use the-u
option to communicate with any server other than the one specified in this variable. You can set a comma-separated list of URIs in the variable, and commands which handle multiple URIs will return output for all listed servers. However, commands which handle a single URI will return information only for the first listed server. See the sburi(5) page in the Reference Guide for more on StreamBase URIs. STREAMBASE_RETITLE_TERMINALS
-
Optional. If set to any value, StreamBase programs assign a terminal window title to match the name of the executable being run. By default terminal titles are not affected. Applies to jsbc dequeue and jsbc enqueue only.