本文整理汇总了Java中backtype.storm.hooks.info.SpoutAckInfo类的典型用法代码示例。如果您正苦于以下问题:Java SpoutAckInfo类的具体用法?Java SpoutAckInfo怎么用?Java SpoutAckInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SpoutAckInfo类属于backtype.storm.hooks.info包,在下文中一共展示了SpoutAckInfo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
@Override
public void spoutAck(SpoutAckInfo info) {
GlobalMetrics.incr("hook_spoutAck");
++spoutAcked;
if (spoutAcked % N == 0) {
System.out.println("spoutAck() is invoked in hook");
System.out.println(info.completeLatencyMs);
System.out.println(info.messageId);
System.out.println(info.spoutTaskId);
}
}
示例2: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
@Override
public void spoutAck(com.twitter.heron.api.hooks.info.SpoutAckInfo info) {
SpoutAckInfo ack = new SpoutAckInfo(info);
for (ITaskHook hook : hooks) {
hook.spoutAck(ack);
}
}
示例3: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
@Override
public void spoutAck(SpoutAckInfo info) {
MeasurableMsgId streamMsgId = (MeasurableMsgId) info.messageId;
if (streamMsgId != null && streamMsgId.isSampled()) {
long cost = System.currentTimeMillis() - streamMsgId.startTime;
completeMetric.addMetric(streamMsgId.stream, cost);
if (cost > qos) {
missMetric.addMetric(streamMsgId.stream, cost);
}
if (completeStatMetric != null) {
completeStatMetric.add(streamMsgId.stream, cost);
}
}
}
示例4: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
@Override
public void spoutAck(SpoutAckInfo info) {
}
示例5: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
@Override
public void spoutAck(SpoutAckInfo info) {
send("SACK", info.spoutTaskId, info.completeLatencyMs, info.messageId);
}
示例6: spoutAck
import backtype.storm.hooks.info.SpoutAckInfo; //导入依赖的package包/类
void spoutAck(SpoutAckInfo info);