MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / ContentWrite

Class ContentWrite

extensions/pythonprocessors/h2o/ConvertDsToCsv.py:52–62  ·  view source on GitHub ↗

ContentWrite callback class is defined for writing streams of data through the session

Source from the content-addressed store, hash-verified

50 return len(self.content)
51
52class ContentWrite(object):
53 """ ContentWrite callback class is defined for writing streams of data through the session
54 """
55 def __init__(self, data):
56 self.content = data
57
58 def process(self, output_stream):
59 """ Use codecs getWriter to write data encoded to the stream
60 """
61 codecs.getwriter('utf-8')(output_stream).write(self.content)
62 return len(self.content)
63
64def onTrigger(context, session):
65 """ onTrigger is executed and passed processor context and session

Callers 1

onTriggerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected