Commit 1dbcd53e authored by Ivan Tyagov's avatar Ivan Tyagov

Comments.

parent 81de1264
"""
This script is used during fluentd ingestion.
It will write data sent from fluentd by unpacking it first and then appending
as a string to respective "Data Stream".
"""
  • @Tyagov First thanks for adding comments to scripts, this is very helpful. For exactenss, I propose to rewrite as follows:

      This script is used during fluentd ingestion.
      It assumes data comes in msgpack encoded in the following format: mspack(timestamp, data).
      It will first unpack the msgpack, then remove the first item of the tuple (timestamp)
      and append str(data) to "Data Stream".
    
      Note that what is saved to Data Stream might be different from what fluentd was reading initially,
      depending on fluentd plugin configuration. For example fluentd might convert json to msgpack,
      then what is saved in Data Stream might be str(python_dict) and not json.
    Edited by Klaus Wölfel
Please register or sign in to reply
out_stream["Data Stream"].appendData(''.join([str(c[1]) for c in context.unpack(data_chunk)]))
"""
This script is used during fluentd ingestion.
It will append data sent from fluentd to Wendelin 'as it is' to respective "Data Stream".
By default data will be encoded in MsgPack format.
"""
  • @Tyagov this script is not specific to fluentd and it is completely independent of msgpack. Therfore I propose to rephrase as follows:

    This script is a general ingestion script which can be used with fluentd or with other http based ingestion tools.
    It will append data sent to Wendelin 'as it is' to respective "Data Stream".
    
    Note that by default fluentd data is encoded in msgpack format, this script will not unpack it.
Please register or sign in to reply
out_stream["Data Stream"].appendData(data_chunk)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment