hortonworks data platform - How to solve the relationship failure? -
i have processor appears creating flowfiles correctly (modified standard processor), when goes commit() session, exception raised:
2016-10-11 12:23:45,700 error [timer-driven process thread-6] c.s.c.processors.files.getfiledata [getfiledata[id=8f5e644d-591c-4df1-8c79-feea118bd8c0]] failed retrieve files due {} org.apache.nifi.processor.exception.flowfilehandlingexception: standardflowfilerecord transfer relationship not specified
i'm assuming supposed indicating there's no connection available commit transfer; however, there "success" relationship registered during init() in same way original processor did it, , success relationship out connected processor input should be.
any suggestions troubleshooting?
what changes did make standard processor? if calling methods on processsession object, ensure saving latest "version" of flowfile returned method calls, , transfer latest version "success".
flowfile references immutable; in code see initial reference "flowfile" pointing @ incoming flow file (from session.get()
example), gets updated flow file mutated, such flowfile = session.putattribute(flowfile, "myattribute", "myvalue")
.
also ensure have transferred or removed latest version of each distinct flow file (not various references same flow file) relationship (even relationship.self
if need be). if processor creates new flow file, ensure new flow file transferred. if incoming flow file no longer needed, sure call session.remove()
on it.
there common patterns , additional guidance in nifi developer's guide, including test patterns; unit test(s) processor should able flush out error (by asserting how many flow files should have been transferred relationship(s) during test).
Comments
Post a Comment