本文整理汇总了Java中backtype.storm.topology.IComponent类的典型用法代码示例。如果您正苦于以下问题:Java IComponent类的具体用法?Java IComponent怎么用?Java IComponent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IComponent类属于backtype.storm.topology包,在下文中一共展示了IComponent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addCreateTimestampAttributeToSchemas
import backtype.storm.topology.IComponent; //导入依赖的package包/类
static void addCreateTimestampAttributeToSchemas(IComponent spoutOrBolt, OutputFieldsDeclarer declarer) {
TransparentFieldsDeclarer transparentDeclarer = new TransparentFieldsDeclarer();
spoutOrBolt.declareOutputFields(transparentDeclarer);
for(Entry<String, List<String>> declaredStream : transparentDeclarer.declaredStreams.entrySet()) {
String streamId = declaredStream.getKey();
boolean direct = transparentDeclarer.directStreams.contains(streamId);
ArrayList<String> fieldsWithID = new ArrayList<String>(declaredStream.getValue());
if(!streamId.startsWith("aeolus::")) {
fieldsWithID.add(CREATE_TS_FIELD_NAME);
}
declarer.declareStream(streamId, direct, new Fields(fieldsWithID));
}
}
开发者ID:mjsax,项目名称:aeolus,代码行数:17,代码来源:TimestampAttributeAppender.java
示例2: getSingleOutputStreamFields
import backtype.storm.topology.IComponent; //导入依赖的package包/类
public static Fields getSingleOutputStreamFields(IComponent component) {
OutputFieldsGetter getter = new OutputFieldsGetter();
component.declareOutputFields(getter);
Map<String, StreamInfo> declaration = getter.getFieldsDeclaration();
if(declaration.size()!=1) {
throw new RuntimeException("Trident only supports components that emit a single stream");
}
StreamInfo si = declaration.values().iterator().next();
if(si.is_direct()) {
throw new RuntimeException("Trident does not support direct streams");
}
return new Fields(si.get_output_fields());
}
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:14,代码来源:TridentUtils.java
示例3: getSingleOutputStreamFields
import backtype.storm.topology.IComponent; //导入依赖的package包/类
public static Fields getSingleOutputStreamFields(IComponent component) {
OutputFieldsGetter getter = new OutputFieldsGetter();
component.declareOutputFields(getter);
Map<String, StreamInfo> declaration = getter.getFieldsDeclaration();
if(declaration.size()!=1) {
throw new RuntimeException("Trident only supports components that emit a single stream");
}
StreamInfo si = declaration.values().iterator().next();
if(si.is_direct()) {
throw new RuntimeException("Trident does not support direct streams");
}
return new Fields(si.get_output_fields());
}
开发者ID:kkllwww007,项目名称:jstrom,代码行数:14,代码来源:TridentUtils.java
示例4: getSpout
import backtype.storm.topology.IComponent; //导入依赖的package包/类
@Override
public IComponent getSpout() {
return s;
}
开发者ID:JamesLampton,项目名称:piggybank-squeal,代码行数:5,代码来源:SpoutSource.java
示例5: getSpout
import backtype.storm.topology.IComponent; //导入依赖的package包/类
IComponent getSpout();
开发者ID:JamesLampton,项目名称:piggybank-squeal,代码行数:2,代码来源:ISource.java
示例6: setBolt
import backtype.storm.topology.IComponent; //导入依赖的package包/类
protected abstract IComponent setBolt(TopologyBuilder builder, String upStreamId);
开发者ID:yiyongfei,项目名称:jea,代码行数:2,代码来源:AbstractTopology.java
注:本文中的backtype.storm.topology.IComponent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论