Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The TCPServer transport handler allows the propagation of results over TCP/IP as a server. This transport handler can be used in both directions, other client can connect to this server to receive data and to publish data.

Remark: Under Windows "TCPServer2" should be used!

Options

  • port: The port to listen for connections

  • read: The size of the read buffer (optional)

  • write: The size of the write buffer (optional)

Example

PQL

Code Block
themeEclipse
languagejavascript
titleTCPServer Transport Handler
linenumberstrue
input = ACCESS({source='Source',
wrapper='GenericPush',
transport='TCPServer',
protocol='CSV',
dataHandler='Tuple',
options=[['port', '8080'],['read', '10240'],['write', '10240']],
schema=[
['id', 'Double'],
['data', 'String']]
})

output = SENDER({sink='Sink',
wrapper='GenericPush',
transport='TCPServer',
protocol='CSV',
dataHandler='Tuple',
options=[['port', '8081'],['read', '10240'],['write', '10240']]
}, input)

CQL

Code Block
themeEclipse
languagesql
titleTCPServer Transport Handler
linenumberstrue
CREATE STREAM source (id Double, data STRING)
    WRAPPER 'GenericPush'
    PROTOCOL 'CSV'
    TRANSPORT 'TCPServer'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'port' '8080', 'read' '10240', 'write' '10240')


CREATE SINK sink (id Double, data STRING)
    WRAPPER 'GenericPush'
    PROTOCOL 'CSV'
    TRANSPORT 'TCPServer'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'port' '8080', 'read' '10240', 'write' '10240')