Toivo, Correct, FlowFiles' contents are sequences of bytes, not objects. So you'll need to serialize those objects in some way. You could use Avro, JSON, XML, some custom serialization, whatever makes sense for your use case.
If you were to use JSON, for instance, and you sent Person to one processor, Customer to another processor, Agreement to a third processor, etc., you could use MergeContent with Binary Concatenation and use a Header "[", a Footer "]", and a Demarcator ",". This would give you a JSON object so that when you merge them all together you have a JSON array. Would that do what you need? Does my suggestion make sense? ---------------------------------------- > Date: Thu, 18 Jun 2015 04:23:27 -0700 > From: [email protected] > To: [email protected] > Subject: Re: How to implement Scatter-Gather? > > Joe > Excellent, I should read more documentation and investigate existing > processors. > > Brandon > Unfortunately A, B, C and D are not simple values, but complex java objects. > For example Person, Customer, Agreement, Fund, Payments, etc. > > I am little bit confused how to put Person, Customer, Agreement, Fund, > Payments, etc in FlowFile. > FlowFile content is sequence of bytes. > There is no structure information, no concept of parts and boundaries > between parts? > > Should I create custom java class ContentHolder which allows to put and get > objects by name? > And FlowFile will contain serialized ContentHolder object. > > When using something like ContentHolder, how I can use MergeContent? > > Thanks > Toivo > > > > > -- > View this message in context: > http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-to-implement-Scatter-Gather-tp1944p1947.html > Sent from the Apache NiFi (incubating) Developer List mailing list archive at > Nabble.com.
