Thanks. Implemented aggregator to emit the tuple as such and used the same
fields of the old stream as the output fields also.

On Thu, Jan 29, 2015 at 6:00 PM, Brunner, Bill <[email protected]>
wrote:

>  An aggregator just collects all the tuples in a batch.  You don’t even
> have to do anything with them inside the aggregator.  When the batch has
> been fully aggregated, then it emits whatever you tell it to from the
> complete() method.  Sure, the output field name is different, but it’s
> still the same tuple.
>
>
>
> *From:* Pandian R [mailto:[email protected]]
> *Sent:* Thursday, January 29, 2015 4:21 AM
> *To:* user; [email protected]
> *Subject:* Re: startBatch and finishBatch for Trident functions
>
>
>
> Thanks. Tried using an Aggregator first, but using aggregator loses the
> original fields in the tuple and forwards only the new fields to the output
> stream.
>
>
>
> On Wed, Jan 28, 2015 at 8:44 PM, Nathan Marz <[email protected]>
> wrote:
>
> You should use an Aggregator if you want to process many tuples within a
> batch, or a State and a StateUpdater if you want to process many tuples
> across batches.
>
>
>
> On Wed, Jan 28, 2015 at 9:55 AM, Pandian R <[email protected]> wrote:
>
> Hi,
>
> I am implementing a trident topology and using functions at many steps(as
> alternative to traditional bolts). But, I don't find a startBatch and
> finishBatch function. I need to do some operations per batch within a
> function. Function has prepare and cleanup which is called per tuple. Can
> someone help how to implement startBatch and finishBatch functions in a
> Function ?
>
> Thanks !
>
>
> --
>
> Regards,
>
> Pandian
>
>
>
>
>
> --
>
> Twitter: @nathanmarz
>
> http://nathanmarz.com
>
>
>
>
> --
>
> Regards,
>
> Pandian
>   ------------------------------
> This message, and any attachments, is for the intended recipient(s) only,
> may contain information that is privileged, confidential and/or proprietary
> and subject to important terms and conditions available at
> http://www.bankofamerica.com/emaildisclaimer. If you are not the intended
> recipient, please delete this message.
>



-- 
Regards,
Pandian

Reply via email to