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.
port: The port to listen for connections
read: The size of the read buffer (optional)
write: The size of the write buffer (optional)
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) |
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')
|