IBM InfoSphere Streams Version 4.1.1

Testing the streams processing application built from the graph

Now, test the streams processing application to verify that the code generated from the graph is correct. You must build (compile) the stream application before you can launch (run) it. There are two types of build configurations: distributed and stand-alone.

Stand-alone mode

To test the streams processing application in stand-alone mode:

  1. Create the input source file.
    1. In the Project Explorer view, expand MyFilterApp > Resources, select data, right-click, and click New > File.
    2. In the File name field, type StockTrades.csv and click Finish.
    3. Copy and paste the sample data into the new file, then save and close the file.
  2. Create a stand-alone build configuration.
    1. In the Project Explorer view, expand MyFilterApp > application, select MyFilterApp [Build: Distributed], right-click, and click New > Standalone Build.
    2. In the Main – Standalone window, keep the default settings and click OK.
    3. Select Standalone, right-click, and click Build.
  3. Run the stand-alone build configuration.
    1. In the Project Explorer view, expand MyFilterApp > application > MyFilterApp > Standalone, right-click, and click Launch.
    2. In the Edit Configuration window, keep the default settings and click Continue.
    3. Click Yes when you are prompted to save the changes.
    Result: The output from the MyFilterApp program is displayed in the Console view.

Distributed mode

To test the streams processing application in distributed mode:

  1. Create the input source file.
    1. In the Project Explorer view, expand MyFilterApp > Resources, select data, right-click, and click New > File.
    2. In the File name field, type StockTrades.csv and click Finish.
    3. Copy and paste the sample data into the new file, then save and close the file.
  2. Create a default instance.
    1. In the Streams Explorer view, expand InfoSphere Streams, select Instances, right-click, and click Make Instance.
    2. In the Instance name field, type MyDefaultInstance and click OK.
  3. Start the default instance.
    1. In the Streams Explorer view, expand Instances, select default:MyDefaultInstance, right-click, and click Start Instance.
  4. Create a distributed build configuration.
    1. In the Project Explorer view, expand MyFilterApp > application > MyFilterApp, select Distributed, right-click, and click Set active.
    2. Select Distributed [Active], right-click, and click Build.
  5. Run the distributed build configuration.
    1. In the Project Explorer view, expand MyFilterApp > application > MyFilterApp [Build: Distributed].
    2. Select Distributed [Active], right-click, and click Launch.
    3. In the Edit Configuration window, click the Browse button next to the Instance field, select MyDefaultInstance, click OK, and then click Continue.
    4. Click Yes when you are prompted to save the changes.
    Result: The output from the MyFilterApp program is sent to the PE console log. To see the output, in the Streams Explorer view, select the PE for the Custom operator, right-click, and click Show PE Console.