• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SpoutDeclarer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中backtype.storm.topology.SpoutDeclarer的典型用法代码示例。如果您正苦于以下问题:Java SpoutDeclarer类的具体用法?Java SpoutDeclarer怎么用?Java SpoutDeclarer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SpoutDeclarer类属于backtype.storm.topology包,在下文中一共展示了SpoutDeclarer类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer setSpout(String id, IRichSpout spout, Number parallelismHint) {
	if(this.meassureThroughput) {
		spout = new ThroughputSpout(spout, this.reportingInterval);
	}
	if(this.meassureLatency) {
		spout = new LatencySpout(spout);
	}
	
	SpoutDeclarer declarer = super.setSpout(id, spout, parallelismHint);
	
	if(this.meassureThroughput) {
		this.callSuper = true;
		setBolt(id + "Stats", new FileFlushSinkBolt(DEFAULT_STATS_DIR + File.separator + id + ".throughput"))
			.shuffleGrouping(id, MonitoringTopoloyBuilder.DEFAULT_THROUGHPUT_STREAM);
		this.callSuper = false;
	}
	
	return declarer;
}
 
开发者ID:mjsax,项目名称:aeolus,代码行数:21,代码来源:MonitoringTopoloyBuilder.java


示例2: setBatchPerTupleSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public SpoutDeclarer setBatchPerTupleSpout(String id, String streamName, IRichSpout spout, Integer parallelism, String batchGroup) {
    Map<String, String> batchGroups = new HashMap();
    batchGroups.put(streamName, batchGroup);
    markBatchGroups(id, batchGroups);
    SpoutComponent c = new SpoutComponent(spout, streamName, parallelism, batchGroup);
    _batchPerTupleSpouts.put(id, c);
    return new SpoutDeclarerImpl(c);
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:9,代码来源:TridentTopologyBuilder.java


示例3: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public SpoutDeclarer setSpout(String id, String streamName, String txStateId, ITridentSpout spout, Integer parallelism, String batchGroup) {
    Map<String, String> batchGroups = new HashMap();
    batchGroups.put(streamName, batchGroup);
    markBatchGroups(id, batchGroups);

    TransactionalSpoutComponent c = new TransactionalSpoutComponent(spout, streamName, parallelism, txStateId, batchGroup);
    _spouts.put(id, c);
    return new SpoutDeclarerImpl(c);
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:10,代码来源:TridentTopologyBuilder.java


示例4: setBatchingSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public SpoutDeclarer setBatchingSpout(String id, IRichSpout spout, int batchSize, Number parallelismHint) {
	MonitoringDeclarer outputFieldsDeclarer = new MonitoringDeclarer();
	spout.declareOutputFields(outputFieldsDeclarer);
	
	Map<String, Integer> batchSizePerStream = new HashMap<String, Integer>();
	for(String streamId : outputFieldsDeclarer.declaredStreams) {
		batchSizePerStream.put(streamId, batchSize);
	}
	
	if(this.meassureThroughput) {
		spout = new ThroughputSpout(spout, this.reportingInterval);
	}
	if(this.meassureLatency) {
		spout = new LatencySpout(spout);
	}
	spout = new SpoutOutputBatcher(spout, batchSizePerStream);
	
	SpoutDeclarer declarer = super.setSpout(id, spout, parallelismHint);
	
	if(this.meassureThroughput) {
		this.callSuper = true;
		setBolt(id + "Stats", new FileFlushSinkBolt(DEFAULT_STATS_DIR + File.separator + id + ".throughput"))
			.shuffleGrouping(id, MonitoringTopoloyBuilder.DEFAULT_THROUGHPUT_STREAM);
		this.callSuper = false;
	}
	
	return declarer;
}
 
开发者ID:mjsax,项目名称:aeolus,代码行数:29,代码来源:MonitoringTopoloyBuilder.java


示例5: setNumTasks

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer setNumTasks(Number val) {
    Number tasks = val;
    if (null != options) {
        tasks = options.getTaskParallelism(spoutId, val);
    }
    return super.setNumTasks(tasks);
}
 
开发者ID:QualiMaster,项目名称:Infrastructure,代码行数:9,代码来源:RecordingTopologyBuilder.java


示例6: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
private SpoutDeclarer setSpout(String id, IRichSpout spout, Number parallelismHint, boolean isSchedule) {
    upToDownstreamComponentsMap.put(id, new HashSet<String>());
    IRichSpout spoutExecutor;
    if (spout instanceof IBasicTransactionSpoutExecutor) {
        spoutExecutor = new BasicTransactionSpout((IBasicTransactionSpoutExecutor) spout);
    } else if (!isSchedule) {
        spoutExecutor = new BasicTransactionSpout((ITransactionSpoutExecutor) spout);
    } else {
        spoutExecutor = new ScheduleTransactionSpout((ITransactionSpoutExecutor) spout);
    }
    SpoutDeclarer ret = super.setSpout(id, spoutExecutor, parallelismHint);
    return ret;
}
 
开发者ID:alibaba,项目名称:jstorm,代码行数:14,代码来源:TransactionTopologyBuilder.java


示例7: addConfigurations

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer addConfigurations(Map conf) {
    _component.componentConfs.add(conf);
    return this;
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:6,代码来源:TridentTopologyBuilder.java


示例8: getSpoutDeclarer

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public SpoutDeclarer getSpoutDeclarer() {
	return new SpoutDeclarerImpl();
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:4,代码来源:TransactionalTopologyBuilder.java


示例9: addConfigurations

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer addConfigurations(Map conf) {
	_spoutConfs.add(conf);
	return this;
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:6,代码来源:TransactionalTopologyBuilder.java


示例10: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer setSpout(String id, IRichSpout spout) {
	return this.setSpout(id, spout, null, null);
}
 
开发者ID:mjsax,项目名称:aeolus,代码行数:5,代码来源:AeolusBuilder.java


示例11: getSpoutDeclarer

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public SpoutDeclarer getSpoutDeclarer() {
    return new SpoutDeclarerImpl();
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:4,代码来源:TransactionalTopologyBuilder.java


示例12: addConfigurations

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer addConfigurations(Map conf) {
    _spoutConfs.add(conf);
    return this;
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:6,代码来源:TransactionalTopologyBuilder.java


示例13: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
@Override
public SpoutDeclarer setSpout(String id, IRichSpout spout) {
    record(id, spout);
    return setNumTasks(id, super.setSpout(id, spout, getExecutorParallelism(id, null)));
}
 
开发者ID:QualiMaster,项目名称:Infrastructure,代码行数:6,代码来源:RecordingTopologyBuilder.java


示例14: setSpout

import backtype.storm.topology.SpoutDeclarer; //导入依赖的package包/类
public void setSpout(String id, IRichSpout spout, int parallelism_hint) {
	// add the spout into the topology
	SpoutDeclarer declarer = builder.setSpout(id, spout, parallelism_hint);

}
 
开发者ID:ohmage,项目名称:lifestreams,代码行数:6,代码来源:LifestreamsTopologyBuilder.java



注:本文中的backtype.storm.topology.SpoutDeclarer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ACLRule类代码示例发布时间:2022-05-22
下一篇:
Java Parameters类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap