本文整理汇总了Java中backtype.storm.generated.GlobalStreamId.get_streamId方法的典型用法代码示例。如果您正苦于以下问题:Java GlobalStreamId.get_streamId方法的具体用法?Java GlobalStreamId.get_streamId怎么用?Java GlobalStreamId.get_streamId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backtype.storm.generated.GlobalStreamId
的用法示例。
在下文中一共展示了GlobalStreamId.get_streamId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createStreams
import backtype.storm.generated.GlobalStreamId; //导入方法依赖的package包/类
/**
* Creates the streams for <code>common</code>.
*
* @param procs already known processors
* @param originName the name of the origin processor
* @param common the common instance to create streams for
* @param cfg configuration
* @param hwAlgType the hardware algorithm type
* @param mapping the name mapping
*/
private static void createStreams(Map<String, StormProcessor> procs, String originName,
ComponentCommon common, Configuration cfg, IDatatype hwAlgType, INameMapping mapping) {
StormProcessor target = getProcessor(procs, originName);
if (null != target) {
for (Map.Entry<GlobalStreamId, Grouping> grouping : common.get_inputs().entrySet()) {
GlobalStreamId id = grouping.getKey();
StormProcessor origin = getProcessor(procs, mapName(mapping, id.get_componentId()));
if (null != origin) {
if (!leaveOutConnection(mapping, origin, cfg, hwAlgType) && !origin.hasOutputTo(target)) {
Stream stream = new Stream(id.get_streamId(), origin, target);
origin.addOutput(stream);
target.addInput(stream);
}
}
}
}
}
示例2: setValues
import backtype.storm.generated.GlobalStreamId; //导入方法依赖的package包/类
public void setValues(GlobalStreamId gstreamId, Double recvTps,
Double process, Long acked, Long failed) {
this.componentId = gstreamId.get_componentId();
this.stream = gstreamId.get_streamId();
this.recvTps = JStormUtils.formatValue(recvTps);
this.acked = JStormUtils.formatValue(acked);
this.failed = JStormUtils.formatValue(failed);
this.process = JStormUtils.formatValue(process);
}