0

I am trying to write a small SPL program in Streams 3.2

In that I need to generate files using filesink and the same file has to be transfered to another server using FTPCommand.

I have copied the com.ibm.streamsx.inet package in path $STREAM_INSTALL/toolkit, but I get an error message;

Code and compiler error The same has done for Streams 4.2 also. still I am getting same error even this package is available in streams 4.2 version.

Can any one please help me?

salathe
  • 51,324
  • 12
  • 104
  • 132
  • The inet toolkit in 3.2.1 does not include the `FTPCommand` operator. To use the operator in Streams 4.2., you have to download version 2.7 of the inet toolkit from Github. https://github.com/IBMStreams/streamsx.inet/releases – ndsilva Oct 30 '17 at 22:03

2 Answers2

0

You need to add the toolkit location of the com.ibm.streamsx.inet toolkit to your sc command.

sc -M TcpExample -t $HOME/toolkits/streamsx.inet.toolkits-2.7.4-20160502-0727/com.ibm.streamsx.inet/

Remark: Code sample above works only if you downloaded and extracted the inet toolkit from gitHub (https://github.com/IBMStreams/streamsx.inet/releases/download/v2.7.4/streamsx.inet.toolkits-2.7.4-20160502-0727.tgz) to $HOME/toolkits, otherwise you need to change the path given with -t option.

  • I have tried for the same as suggest but I am getting the below error **com.ibm.streamsx.inet/com.ibm.streamsx.inet.rest/namespace-info.spl:96:11: CDISP0435E ERROR: The com.ibm.streamsx.inet.rest namespace that is defined in the com.ibm.streamsx.inet/com.ibm.streamsx.inet.rest/namespace-info.spl SPL file does not match the com.ibm.streamsx.inet.com.ibm.streamsx.inet.rest namespace that is derived from the following directory path: com.ibm.streamsx.inet/com.ibm.streamsx.inet.rest.** – Gandhi Sree Nov 02 '17 at 07:59
  • FTPCommand operator is in namespace: com.ibm.streamsx.inet.ftp – Mark.Heger Nov 02 '17 at 08:58
  • The error message gives a hint that you might have given the wrong directory with -t option since com.ibm.streamsx.inet/com.ibm.streamsx.inet.rest is mentioned. Take care to point with -t option to the **com.ibm.streamsx.inet** dir -t $HOME/toolkits/streamsx.inet.toolkits-2.7.4-20160502-0727/com.ibm.streamsx.inet – Mark.Heger Nov 02 '17 at 09:05
0

If you like to transfer a file from local to remote host, probably the FTPPutFile operator is the better choice. The streamsx.inet toolkit from public github requires streams minimum version 4.0.1. So the streams version 4.2 is fine.

Some time ago I provided a custom version of the toolkit which contains only the FTP operators but can be used with a streams release 3x (platform RHEL6 X86-64) here: https://github.com/joergboe/streamsx.inet/releases/tag/untagged-026faf73c5c2628bd514