Skip to content

Commit aa22b23

Browse files
committed
Changes done for DPS to be used in Streams 4.x
1 parent 40f081d commit aa22b23

17 files changed

+126
-44
lines changed

com.ibm.streamsx.dps/.toolkitList

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
com.ibm.streamsx.dps/1.0.9
2-
spl/1.1.0
3-
058_data_sharing_between_non_fused_spl_custom_and_cpp_primitive_operators/1.0.0
4-
061_data_sharing_between_non_fused_spl_custom_operators_and_a_native_function/1.0.0
5-
062_data_sharing_between_non_fused_spl_custom_and_java_primitive_operators/1.0.0
6-
dps_test_1/1.0.0
1+
com.ibm.streamsx.dps/2.0.9
2+
spl/1.2.0
3+
dps_test_1/1.0.1

com.ibm.streamsx.dps/doc/dps-usage-tips.txt

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Following are the NoSQL K/V stores supported by the DPS toolkit:
2222

2323
A companion IBM developerWorks article about this toolkit: http://tinyurl.com/nxrf3gg
2424

25-
[Apr/12/2015] [DPS toolkit version 1.0.9] [Share and prosper]
25+
This version of the DPS toolkit works with Streams 4.x and higher versions.
26+
27+
[Apr/15/2015] [DPS toolkit version 2.0.9] [Share and prosper]
2628
================================================================================================
2729
This usage tips file provides high-level implementation details about the Streams DPS toolkit.
2830
Main effort here is to provide a Streams toolkit that will allow data sharing
@@ -132,7 +134,7 @@ DPS toolkit is routinely compiled and tested in our Streams lab using the follow
132134
a) RedHat Enterprise Linux 6.4 (or an equivalent CentOS version) + gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
133135
b) RedHat Enterprise Linux 6.4 for IBM Power machines + gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
134136
[Dec/23/2014: DPS toolkit version 1.0.6 and later can't be used with RHEL5 and CentOS5.]
135-
c) IBM InfoSphere Streams Version 3.x
137+
c) IBM InfoSphere Streams Version 4.x and higher versions
136138
d) memcached server version 1.4.15 with libmemcached client version 1.0.16
137139
e) redis server version 2.8.19 with hiredis C client version 0.12.1
138140
f) Cassandra server version 2.1.4 with C++ client driver 1.0.1 (April/2015) from DataStax
@@ -452,7 +454,7 @@ If you installed Cassandra, you can start Cassandra as shown below.
452454
1.7u25, from here and unzip it in your own directory and set the JAVA_HOME environment variable to that new Java directory.
453455

454456
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
455-
(As of April/2015, the latest version of Java SDK from this URL is 1.7.0_75)
457+
(As of April/2015, the latest version of Java SDK from this URL is 1.7.0_79)
456458

457459
d) You can now start Cassandra to run in the background using this command: $CASSANDRA_HOME/bin/cassandra
458460

@@ -970,9 +972,16 @@ you can skip steps 1 and 2 below.
970972
This will create a new dps-helper.jar file in the impl/java/bin directory. This is needed to access the DPS
971973
functions from a Java primitive operator.
972974

973-
4) Switch to <your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/bin directory and run this script: ./build-distributed.sh.
974-
5) You have to edit the <your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/etc/no-sql-kv-store-servers.cfg file and add the names or the
975-
IP addresses of your memcached or redis or Cassandra or Cloudant or HBase or Mongo servers. Then, save the file.
975+
4) You have to edit the <your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/etc/no-sql-kv-store-servers.cfg file and add the names or the
976+
IP addresses of your memcached or redis or Cassandra or Cloudant or HBase or Mongo or Couchbase or Aerospike or Redis-Cluster servers.
977+
Then, save the file.
978+
5) Switch to <your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/bin directory and run this script: ./build-distributed.sh.
979+
[Note: Whenever you change the DPS configuration file as shown in step 4, you must build the application and ensure that
980+
the application bundle (sab) file in the output directory has a new file modification time. If that file's modification time
981+
indicates that the sab file never got updated, then you must completely remove
982+
<your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/output directory and build again. If you don't do this, your DPS configuration
983+
changes will not take effect. As of Apr/2015, this is a new requirement/restriction in Streams 4.x to update the
984+
application bundle with your modified DPS configuration file. This requirement/restriction will be eliminated in a future release.]
976985
6) To test the application, you can run this script from <your_base_dir>/com.ibm.streamsx.dps/samples/dps_test1/bin: ./run-distributed.sh -i <YOUR_STREAMS_INSTANCE_NAME>
977986
7) You can verify the application results in the Streams PE log files.
978987
--> You have to first read the SPLMM file and understand which operator writes what in the PE log files.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

com.ibm.streamsx.dps/impl/src/DistributedProcessStore.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,19 @@ namespace distributed
7474
conf /= "../etc/no-sql-kv-store-servers.cfg";
7575
std::string confFile = conf.string();
7676
*/
77-
// Refer to the etc directory with a relative path from the default current directory (i.e. data directory)
78-
std::string confFile = "../etc/no-sql-kv-store-servers.cfg";
79-
77+
std::string appDirectory = ProcessingElement::pe().getApplicationDirectory();
78+
/*
79+
std::string dataDirectory = ProcessingElement::pe().getDataDirectory();
80+
std::string outputDirectory = ProcessingElement::pe().getOutputDirectory();
81+
std::string toolkitDirectory = ProcessingElement::pe().getToolkitDirectory();
82+
cout << "App directory=" << appDirectory << endl;
83+
cout << "Data directory=" << dataDirectory << endl;
84+
cout << "Output directory=" << outputDirectory << endl;
85+
cout << "Toolkit directory=" << toolkitDirectory << endl;
86+
*/
87+
// Refer to the etc directory with a relative path from the application directory.
88+
std::string confFile = appDirectory + "/etc/no-sql-kv-store-servers.cfg";
89+
8090
// Format of this file is as shown below.
8191
// Several comment lines beginning with a # character.
8292
// Then, the very first non-comment line will tell us the

com.ibm.streamsx.dps/info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<info:identity>
44
<info:name>com.ibm.streamsx.dps</info:name>
55
<info:description></info:description>
6-
<info:version>1.0.9</info:version>
7-
<info:requiredProductVersion>2.0.0</info:requiredProductVersion>
6+
<info:version>2.0.9</info:version>
7+
<info:requiredProductVersion>4.0.0.0</info:requiredProductVersion>
88
</info:identity>
99
<info:dependencies/>
1010
</info:toolkitInfoModel>
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
dps_test_1/1.0.0
2-
spl/1.1.0
3-
058_data_sharing_between_non_fused_spl_custom_and_cpp_primitive_operators/1.0.0
4-
061_data_sharing_between_non_fused_spl_custom_operators_and_a_native_function/1.0.0
5-
062_data_sharing_between_non_fused_spl_custom_and_java_primitive_operators/1.0.0
6-
com.ibm.streamsx.dps/1.0.9
1+
dps_test_1/1.0.1
2+
spl/1.2.0
3+
com.ibm.streamsx.dps/2.0.9

0 commit comments

Comments
 (0)