Topic
  • 2 replies
  • Latest Post - ‏2013-04-29T21:33:11Z by Frank_Blau
Frank_Blau
Frank_Blau
28 Posts

Pinned topic Parsing a TCPSource

‏2013-04-28T21:37:11Z |

I am trying to parse a TCPSource into tuples, and I am not having a lot of luck.

The TCP Data is coming across ok, because I can load into a file and see it as a line, but when I try and parse that into tuples I get errors in distributed mode.  

Any help would be appreciated!

 

Frank

 

Here is my code:

 

 
 
composite Main
{
graph
(stream<blob TCP_Str> TCP_Data) as TCPSource_1 = TCPSource()
{
param
role : server ;
port : 6001u ;
format : block ;
blockSize : 1u ;
}
 
stream<tuple<rstring tcp_time, rstring tcp_duration,
rstring tcp_cmd> tcp_blob> A = Parse(TCP_Data)
{
param
format : csv ;
parseInput : TCP_Str ;
}
 
() as FileSink_1 = FileSink(TCP_Data)
{
param
file : "tcp_datafile.csv" ;
format : csv ;
}
 
() as FileSink_2 = FileSink(A)
{
param
file : "tokenizedData" ;
}
 
}
 
  • danlopezv
    danlopezv
    22 Posts

    Re: Parsing a TCPSource

    ‏2013-04-29T21:21:01Z  

    Can you be more specific on the errors that you're getting?

  • Frank_Blau
    Frank_Blau
    28 Posts

    Re: Parsing a TCPSource

    ‏2013-04-29T21:33:11Z  
    • danlopezv
    • ‏2013-04-29T21:21:01Z

    Can you be more specific on the errors that you're getting?

    Hey Dan,

    I was able to get past this using the tokenize function.

    Will be posting some stuff from the project in a second here.

     

    Thanks!