Page tree

Versions Compared

Key

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

This handler initially reads 4 byte and interpreting them as input size. The byte order is the java byte order (BIG_ENDIAN) or can be set with the parameter ByteOrder to "LITTLE_ENDIAN". After reading size bytes the Buffer is send to the data handler.

Options

  • byteorder: The byte order of the byte stream (BID_ENDIAN or LITTLE_ENDIAN)

Example

PQL

Code Block
themeEclipse
languagejavascript
titleSizeByteBuffer Protocol Handler
linenumberstrue
input = ACCESS({source='Buffer', wrapper='GenericPush',
transport='NonBlockingTcp',protocol='SizeByteBuffer',
  dataHandler='Tuple',options=[['byteorder','BIG_ENDIAN'],['port','65321'], ['host','localhost']],
  schema=[
    ['symbol','String'],
    ['points','Double'] ]
})

CQL

Code Block
themeEclipse
languagesql
titleSizeByteBuffer Protocol Handler
linenumberstrue
CREATE STREAM buffer (symbol String, points Double)   
    WRAPPER 'GenericPush'
    PROTOCOL 'SizeByteBuffer'
    TRANSPORT 'NonBlockingTcp'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'start' '0x1', 'end' '0x2' , 'port' '65321', 'host' 'localhost')