Trident is actually a high level API over the regular Storm spout/bolts
API. Upon submitting a Trident topology, Storm reorganizes the various
topology components (spouts, functions, filters, etc) into as few Storm
bolts as possible. How it does so is described on Storm's wiki. Yes, that
means this complicates the various stats in Storm UI. Trident also adds a
master coordinator spout and spout coordinator bolts behind the scenes.

What you can do is make a Trident Filter Function and place it right after
the spout or between any components you want to track the throughput and
latency for, like this:

     .each(new Fields(), new MyThroughputLoggingFilterFunction())

The MyThroughputLoggingFilterFunction would be implemented as a Trident
Filter function and would just be counting the tuples passing through it.
Initialize the counter variable (such as Integer myCounter = 0) in the
prepare() method, and increment the counter in the execute() method. For
tracking various timing-related stats, use Java's System.nanoTime() and do
the math necessary for your case.

Regards,

Danijel



On Sat, Feb 15, 2014 at 3:48 PM, Premdass Ravidass <premdas...@gmail.com>wrote:

> Hi,
>
> I am new user to storm-trident, and struggling to understand how i can
> measure the throughput and latency on a trident topology.
>
> For example, if we take the TridentWorkCount Topology, and run it in a
> storm cluster, in *Topology Stats* of Storm UI, i see a big difference in
> the emitted transferred values, and the Ack-ed values . Is that expected?
>
> To answer a simple question of "How many words are being processed by the
> TridentWordCount topology in a second or Minute", What should i do? Please
> advice.
>
> Thanks for your responses, in Advance.
>
> Regards,
> Prem
>



-- 
Danijel Schiavuzzi

Reply via email to