Skip to content

Commit a2a800d

Browse files
streamsadminchanskw
authored andcommitted
Add example for testing SPL composites
1 parent 2a22d83 commit a2a800d

32 files changed

+1235
-1
lines changed

.gitignore

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
/.project
1+
*.*~
2+
.gradle
3+
build/
4+
5+
# SPL toolkit files
6+
.toolkitList
7+
toolkit.xml
8+
*.sab
9+
output/
10+
11+
# Compiled class file
12+
*.class
13+
14+
# Log file
15+
*.log
16+
17+
# BlueJ files
18+
*.ctxt
19+
20+
# Mobile Tools for Java (J2ME)
21+
.mtj.tmp/
22+
23+
# Package Files #
24+
*.jar
25+
*.war
26+
*.ear
27+
*.tar.gz
28+
*.rar
29+
30+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
31+
hs_err_pid*
32+
33+
# Python
34+
__pycache__
35+
.pyc
36+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="impl/java/bin" path="impl/java/src"/>
4+
<classpathentry exported="true" kind="con" path="com.ibm.streams.java/com.ibm.streams.operator"/>
5+
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6+
<classpathentry kind="src" path=".apt_generated">
7+
<attributes>
8+
<attribute name="optional" value="true"/>
9+
</attributes>
10+
</classpathentry>
11+
<classpathentry kind="output" path="impl/java/bin"/>
12+
</classpath>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>com.ibm.streamsx.testing.app</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>com.ibm.streams.studio.splproject.builder.SPLProjectBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
26+
<nature>com.ibm.streams.studio.splproject.SPLProjectNature</nature>
27+
<nature>org.eclipse.jdt.core.javanature</nature>
28+
</natures>
29+
</projectDescription>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
3+
<properties>
4+
<comment>SPL Build Configuration: BuildConfig</comment>
5+
<entry key="com.ibm.streams.studio.splproject:STATIC_LINKING">F</entry>
6+
<entry key="com.ibm.streams.studio.splproject:OPTIMIZED_CODE">T</entry>
7+
<entry key="com.ibm.streams.studio.splproject:FUSION_MODE">FDEF</entry>
8+
<entry key="com.ibm.streams.studio.splproject:MAIN_COMPOSITE">application::Main</entry>
9+
<entry key="com.ibm.streams.studio.splproject:NAME">BuildConfig</entry>
10+
<entry key="com.ibm.streams.studio.splproject:GCC_OPTS"/>
11+
<entry key="com.ibm.streams.studio.splproject:SC_OPTS"/>
12+
<entry key="com.ibm.streams.studio.splproject:ACTIVE">T</entry>
13+
<entry key="com.ibm.streams.studio.splproject:LD_OPTS"/>
14+
<entry key="com.ibm.streams.studio.splproject:PRE_BUILD_CMD"/>
15+
<entry key="com.ibm.streams.studio.splproject:DATA_DIR"/>
16+
<entry key="com.ibm.streams.studio.splproject:POST_BUILD_CMD"/>
17+
<entry key="com.ibm.streams.studio.splproject:REPLACE_ENVIRONMENT">F</entry>
18+
<entry key="com.ibm.streams.studio.splproject:USE_PROJECT_DATA_DIR">T</entry>
19+
<entry key="com.ibm.streams.studio.splproject:PROFILING"/>
20+
<entry key="com.ibm.streams.studio.splproject:SDB">F</entry>
21+
<entry key="com.ibm.streams.studio.splproject:DEFAULT_POOL_SIZE"/>
22+
<entry key="com.ibm.streams.studio.splproject:OUTPUT_DIR">BuildConfig</entry>
23+
<entry key="com.ibm.streams.studio.splproject:SAMPLING_RATE"/>
24+
<entry key="com.ibm.streams.studio.splproject:STANDALONE">F</entry>
25+
</properties>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
line.separator=\n
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.apt.aptEnabled=true
3+
org.eclipse.jdt.apt.reconcileEnabled=false
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.processAnnotations=enabled

examples/spl_composites/com.ibm.streamsx.testing.app/application/.namespace

Whitespace-only changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace application ;
2+
3+
use com.ibm.streamsx.testing.toolkit::* ;
4+
5+
/** This main composite invokes the MultiplyBy composite operator.
6+
* This demonstrates how clients can set up their application to make
7+
* business logic more reusable and how automated unite tests can be done
8+
* for those business logic.
9+
*
10+
*/
11+
composite Main
12+
{
13+
graph
14+
15+
(stream<int32 counter> Beacon_2_out0) as Beacon_2 = Beacon()
16+
{
17+
param
18+
period : 1.0 ;
19+
output
20+
Beacon_2_out0 : counter =(int32) IterationCount() ;
21+
}
22+
23+
(stream<int32 result> TestCustomOperator_1_out0) as TestCustomOperator_1 =
24+
MultiplyBy(Beacon_2_out0)
25+
{
26+
param
27+
factor : 3 ;
28+
}
29+
30+
() as Custom_3 = Custom(TestCustomOperator_1_out0 as inputStream)
31+
{
32+
logic
33+
onTuple inputStream :
34+
{
35+
printStringLn((rstring) inputStream) ;
36+
}
37+
38+
}
39+
40+
}
41+

examples/spl_composites/com.ibm.streamsx.testing.app/com.ibm.streamsx.testing.toolkit/.namespace

Whitespace-only changes.

0 commit comments

Comments
 (0)