本文整理汇总了Java中storm.trident.tuple.ConsList类的典型用法代码示例。如果您正苦于以下问题:Java ConsList类的具体用法?Java ConsList怎么用?Java ConsList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConsList类属于storm.trident.tuple包,在下文中一共展示了ConsList类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: emit
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public List<Integer> emit(String ignore, List<Object> values, Object msgId) {
long batchIdVal = _rand.nextLong();
Object batchId = new RichSpoutBatchId(batchIdVal);
FinishCondition finish = new FinishCondition();
finish.msgId = msgId;
List<Integer> tasks = _collector.emit(_stream, new ConsList(batchId, values));
Set<Integer> outTasksSet = new HashSet<Integer>(tasks);
for(Integer t: _outputTasks) {
int count = 0;
if(outTasksSet.contains(t)) {
count = 1;
}
long r = _rand.nextLong();
_collector.emitDirect(t, _coordStream, new Values(batchId, count), r);
finish.vals.add(r);
_msgIdToBatchId.put(r, batchIdVal);
}
_finishConditions.put(batchIdVal, finish);
return tasks;
}
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:22,代码来源:RichSpoutBatchTriggerer.java
示例2: emit
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public List<Integer> emit(String ignore, List<Object> values, Object msgId) {
long batchIdVal = _rand.nextLong();
Object batchId = new RichSpoutBatchId(batchIdVal);
FinishCondition finish = new FinishCondition();
finish.msgId = msgId;
List<Integer> tasks = _collector.emit(_stream, new ConsList(batchId, values));
Set<Integer> outTasksSet = new HashSet<Integer>(tasks);
for (Integer t : _outputTasks) {
int count = 0;
if (outTasksSet.contains(t)) {
count = 1;
}
long r = _rand.nextLong();
_collector.emitDirect(t, _coordStream, new Values(batchId, count), r);
finish.vals.add(r);
_msgIdToBatchId.put(r, batchIdVal);
}
_finishConditions.put(batchIdVal, finish);
return tasks;
}
开发者ID:kkllwww007,项目名称:jstrom,代码行数:22,代码来源:RichSpoutBatchTriggerer.java
示例3: emit
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public List<Integer> emit(String ignore, List<Object> values, Object msgId) {
long batchIdVal = _rand.nextLong();
Object batchId = new RichSpoutBatchId(batchIdVal);
FinishCondition finish = new FinishCondition();
finish.msgId = msgId;
List<Integer> tasks = _collector.emit(_stream, new ConsList(batchId, values));
Set<Integer> outTasksSet = new HashSet<Integer>(tasks);
for(Integer t: _outputTasks) {
int count = 0;
if(outTasksSet.contains(t)) {
count = 1;
}
long r = _rand.nextLong();
_collector.emitDirect(t, _coordStream, new Values(batchId, count), r);
finish.vals.add(r);
}
_finishConditions.put(batchIdVal, finish);
return tasks;
}
开发者ID:troyding,项目名称:storm-resa,代码行数:21,代码来源:RichSpoutBatchTriggerer.java
示例4: emit
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public List<Integer> emit(String ignore, List<Object> values, Object msgId) {
long batchIdVal = _rand.nextLong();
Object batchId = new RichSpoutBatchId(batchIdVal);
FinishCondition finish = new FinishCondition();
finish.msgId = msgId;
List<Integer> tasks = new ArrayList<>();
_collector.emit(_stream, new ConsList(batchId, values), new CollectorCb(tasks));
_collector.flush();
Set<Integer> outTasksSet = new HashSet<>(tasks);
for(Integer t: _outputTasks) {
int count = 0;
if(outTasksSet.contains(t)) {
count = 1;
}
long r = _rand.nextLong();
_collector.emitDirect(t, _coordStream, new Values(batchId, count), r);
finish.vals.add(r);
_msgIdToBatchId.put(r, batchIdVal);
}
_finishConditions.put(batchIdVal, finish);
return tasks;
}
开发者ID:alibaba,项目名称:jstorm,代码行数:24,代码来源:RichSpoutBatchTriggerer.java
示例5: execute
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public void execute(ProcessorContext context, String streamId, TridentTuple tuple) {
_collector.emit(streamId, new ConsList(context.batchId, tuple));
}
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:5,代码来源:BridgeReceiver.java
示例6: emit
import storm.trident.tuple.ConsList; //导入依赖的package包/类
@Override
public void emit(List<Object> values) {
_delegate.emit(_stream, new ConsList(_id, values));
}
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:5,代码来源:TridentSpoutExecutor.java
注:本文中的storm.trident.tuple.ConsList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论