Because use basic storm instead of trident.Is there a good way to measure TPS in basic storm?
----- Reply message ----- 寄件者: "Romain Leroux" <[email protected]> 收件者: <[email protected]>, "이승진" <[email protected]> 主旨: How do you measure TPS of topology? 日期: 週五, 6月 27 日, 2014 年 3:54 下午 Probably not a good practice but at least gives you an idea : public class LogThroughput extends BaseFunction{ private static final Logger LOG = LoggerFactory.getLogger(LogThroughput.class); private AtomicInteger tuplesCounter; private Thread tWatcher; private String message; private class WatcherThread implements Runnable { @Override public void run() { while(!Thread.interrupted()) { try { Thread.sleep(1000); LOG.info("<"+message+"> Throughput: "+tuplesCounter.getAndSet(0)+" tuples/sec at "+new Date().toString()); } catch (InterruptedException e) { } } } } public LogThroughput(String message){ this.message = message; } public LogThroughput(){ this.message = ""; } @Override public void prepare(Map conf, TridentOperationContext context) { tuplesCounter = new AtomicInteger(0); tWatcher = new Thread(new WatcherThread(), "watcher1337"); tWatcher.start(); } @Override public void execute(TridentTuple tuple, TridentCollector collector) { tuplesCounter.incrementAndGet(); collector.emit(tuple); } } 2014-06-25 17:10 GMT+09:00 이승진 <[email protected]>: Dear all, Is there a good practice of measuring TPS of topology? I have no idea where to start from since there's only latency information in storm UI would be great if you can share your experience Sincerly,
