Debugging an application in distributed mode

A stream application is debugged in a job that is submitted to a running Teracloud® Streams instance.

Debugging is accomplished by having the PEs started with the sdb wrapper, which runs the PEs in an xterm window under the Streams Debugger (sdb). Add a config clause as follows:

stream<LineStat> CountAllLines = Custom(CountOneLine)
{
  logic
    state :
    // ... skipped for brevity
  config
    wrapper : sdb;
}

The xterm window provides the console input and output environment to run the sdb commands. If there is no operator fusing in effect for the stream application, the debugging for each operator is in a separate xterm window. If some operators are fused, all the operators for a PE are debugged in the same xterm window.

Starting the instance and submitting the job

You can start a Teracloud® Streams instance and the stream application within the instance from the command line.

Start the instance with the following command:

streamtool startinstance

Submit the job with the following command:

streamtool submitjob file.sab

When the job is submitted, any PE that contains an operator with the wrapper:   sdb; specified opens in a new xterm window.

Canceling the job and stopping the instance

You can cancel the job and shut down the Teracloud® Streams instance from the command line.

Cancel the job with the following command:

streamtool canceljob jobNumber

Shut down the instance with the following command:

streamtool stopinstance