Contents
This topic describes how to use the Run Configuration Wizard and Debug Configuration Wizard. Both wizards have the same usages and allow you to set the same settings.
Note
StreamBase Studio provides two entrance paths for setting up launch configurations: one for running applications, and another for debugging. By default, however, Studio configures and saves a single set of named configurations per Studio workspace, whether for running or debugging. The and menu options invoke almost identical configuration dialogs.
To create a new StreamBase launch configuration, open the Run or Debug dialog and do one of the following:
-
In the left pane, right-click StreamBase Application, and choose New in the context menu.
-
In the left pane, select StreamBase Application and click the New toolbar button.
-
Select the name of an existing StreamBase launch configuration and click the Duplicate toolbar button.
To edit an existing launch configuration:
-
Open the the Run or Debug dialog .
-
Select the name of the configuration to edit.
-
Make changes in the tabs of the wizard and click the Apply button before you leave each tab.
-
Click to undo changes since the last saved version.
After applying your edits, click to preserve your edits and exit the wizard.
In the Run dialog, you can click to run the newly edited launch configuration. Running a configuration places it at the top of the list of last-run configurations.
In the Debug dialog, you can click to run and debug the current launch configuration.
- Name
-
A configuration name is generated for you. Change the name according to your site's standards. The name you enter is not reflected in the navigator on the left until you click Apply.
- Application
-
Specify the path to the StreamBase EventFlow or StreamSQL application file to be run or debugged. Paths are absolute, measured from the root of the current Studio workspace. The easiest way to enter the correct path format is to browse for an application file using the button. The resulting dialog shows a list of all
.sbappand.ssqlfiles in your workspace. Select the one you want and click OK.
- Target Server
-
Choose one of the following options:
- Local
-
Launches the StreamBase Server on this machine.
- Remote using workspace defaults
-
Launches a StreamBase Server on a separate UNIX machine using default server settings. If you previously defined a default server machine and username in your StreamBase Studio preferences, those defaults are automatically used. See StreamBase Studio Preferences for details.
- Remote using the following target server
-
Launches a StreamBase Server on a separate UNIX machine with settings that you specify for this launcher only (any workspace defaults are ignored). Fill in the next two fields:
- Server machine
-
Enter the name of the remote host on which to invoke StreamBase Server. The remote host name must be a valid DNS name, IP address, or the string
localhost, and can be optionally followed by a colon and the port number on which the remote server will listen. The remote server must be accessible from this machine using SSH. For example:wayfast.example.com:22
- Username
-
Enter a valid SSH username on the specified remote host. The username must be already set up and tested for SSH connectivity to the specified host.
- Debugging Options
-
The Enable Intermediate Stream Dequeue checkbox allows you to dequeue from intermediate streams while your application is running, for temporary debugging purposes only. Enabling this checkbox is the same as setting
-Dstreambase.codegen.intermediate-stream-dequeue=truein sbd'sjvm-argsin the server configuration file. You can optionally specify a regular expression that matches the names of the intermediate streams whose output you want to dequeue. This is equivalent to setting-Dstreambase.codegen.intermediate-stream-dequeue-regex=. See Dequeuing Data from Intermediate Streams for more information.patternThe Allow Remote Java Debugging checkbox is for debugging embedded Java modules you have added to your StreamBase application. Specify the port number to which a remote Java debugger will connect to your Java module. For example, you might be using Eclipse's Remote Java Application Debug Launch Configuration to debug embedded Java code live, running inside a StreamBase Server instance that was launched with this option checked.
- Server Logging Level
-
Select Current Studio logging level to use the logging level that Studio knows about at launch time. If you start Studio with a higher log level, launch configurations that use this setting will use the higher log level.
Select Specified to override the global logging level. The higher the log level number you specify, the more messages and message types are sent to the Console View and/or to an output log file, if this launch configuration specifies one.
- Persistent Data Options
-
This option specifies a directory to be used for persistent data in disk-based Query Tables (available only in StreamBase Enterprise Edition). This is the same option specified as
--datadirwhen running sbd from the command line. Use the default or specify an existing directory, accessible to and writable by StreamBase Server. - Working Directory
-
Use this option to change the working directory for a local launch. Any files output by your running application (for example, generated CSV files) are created relative to your working directory. By default, the working directory is the folder that contains the application file you are launching. Click Specified to enter a different working directory. This option is ignored for remote target servers.
Use the Containers tab to specify one or more containers to hold and run other StreamBase applications that you want to start at the same time as the primary application specified on the Main tab. StreamBase containers are described on Container Overview.
You can run StreamBase Server with more than one container from the command line, by specifying your container configuration in the server configuration file or interactively with sbadmin commands. The Containers tab allows you to do the same in StreamBase Studio.
With multiple applications running in containers, the names of streams in
applications running in non-default containers are prefixed with the container
name. Thus, sideplay.OutgoingBids refers to the output
stream named OutgoingBids in the application running
in the container named sideplay.
Most of the features of running an application in Studio apply to the applications running in containers as well. This includes:
-
In the Manual Input view, you can send tuples manually to input streams in non-default containers.
-
The Application Input view shows tuples sent to all input streams, including those in non-default containers.
-
The Application Output view shows tuples from all output streams in all running containers.
However, running multiple containers in Studio has the following limitations:
-
The primary StreamBase application, the one specified on the Main tab, is always started in a container named
default. You cannot name the container for the primary application. -
When debugging, only the path through the primary application is traversed. Debugging does not step across container boundaries.
-
You cannot create separate feed simulations for the primary application and for applications running in containers. Only streams in the
defaultcontainer can be addressed.
Use the Selected Container Connections area to specify one or more connections between containers. Container connections are described in Container Connections.
You will typically use this feature to specify a stream to stream connection, where an input stream in one application and container receives tuples from an output stream in another application and container. However, you can specify any container connection type in the Containers tab that you can specify in the server configuration file or interactively with the sbadmin command.
To specify a container connection, first select the line for the container of interest in the Containers section of the tab. Click the button, and specify the Source and Destination streams, using stream names qualified with the container name, as shown in this example:
Select an existing container connection line to activate the , , and buttons. To create a container connection that is very similar to an existing connection, use the button to copy the existing connection, then select the new connection and use the button to modify the new connection.
The settings in the Common tab are common to all Eclipse launch configurations. Use Eclipse Help to learn how more about these options.
- Save as
-
This option determines where this launch configuration is saved. The default setting, Local file, saves configurations in the workspace metadata area. As an alternative, you can select Shared file to save this launch configuration as a file in one of your Project folders. In this case, the launch configuration is saved as
, whereName.launchNameis specified in the Name field. Specify the target Project folder using the button. - Display in favorites menu
-
The favorites menu is a list of launch configuration names that appears in the second section of the drop-down menu of the and buttons on the toolbar. The first section contains a changing list of recently-run launch configurations. Add a configuration to the favorites section to keep it in the menu, even when other applications have replaced it in the recently-run section. This option performs the same function as the Organize Favorites option in the and drop-down menus.
- Console Encoding
-
Use this section to specify a non-default character encoding for log messages sent to the Console View (and optionally to a standard output file).
- Standard Input and Output
-
Allocate Console is checked by default. This specifies using the Console view to display logging messages written to standard output and standard error, and to accept text input, if your application requires it. You can disable this option for launch configurations that will run on remote StreamBase Servers.
File is unchecked by default. To specify that standard output and standard error of your application's run are written to a log file, check the File checkbox, and enter a path to an existing file. If both Allocate Console and File are checked, log messages are written to both places. You must designate the path to the file using an Eclipse-specific syntax. Rather than typing a path, use the or buttons to navigate to an existing file, and let Eclipse write the syntax for you. To navigate to a file in the workspace, you must first have created it with Studio's → → menu option. If you are familiar with the Eclipse syntax required in this field, you can use the button to build up a path from components.
is greyed out unless is checked. Check the checkbox to have log messages appended to the file specified in the field. By default, the file is overwritten with each run of this launch configuration.
- Launch in background
-
This option is checked by default, to specify that the StreamBase Server process is launched in the background.
By default, running or debugging a StreamBase application with a launch configuration automatically switches StreamBase Studio to the SB Test/Debug perspective, after prompting you to confirm. You can specify on the prompt dialog to not ask again.
The option to switch perspectives is not stored in the launch configuration itself, but is a global setting for all StreamBase applications, as specified in StreamBase Studio Preferences.
