当前位置: 首页>>代码示例>>Java>>正文


Java InprocMessaging类代码示例

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


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

示例1: nextTuple

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
@Override
public void nextTuple() {
	List<Object> toEmit = (List<Object>) InprocMessaging.pollMessage(_id);
	if (toEmit != null) {
		List<Object> tuple = (List<Object>) toEmit.get(0);
		Object msgId = toEmit.get(1);

		_collector.emit(tuple, msgId);
	} else {
		try {
			Thread.sleep(1);
		} catch (InterruptedException e) {
			throw new RuntimeException(e);
		}
	}
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:17,代码来源:FeederSpout.java

示例2: nextTuple

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void nextTuple() {
	List<Object> toEmit = (List<Object>) InprocMessaging.pollMessage(_id);
	if (toEmit != null) {
		List<Object> tuple = (List<Object>) toEmit.get(0);
		Object msgId = toEmit.get(1);

		_collector.emit(tuple, msgId);
	} else {
		try {
			Thread.sleep(1);
		} catch (InterruptedException e) {
			throw new RuntimeException(e);
		}
	}
}
 
开发者ID:songtk,项目名称:learn_jstorm,代码行数:16,代码来源:FeederSpout.java

示例3: nextTuple

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void nextTuple() {
    List<Object> toEmit = (List<Object>) InprocMessaging.pollMessage(_id);
    if (toEmit != null) {
        List<Object> tuple = (List<Object>) toEmit.get(0);
        Object msgId = toEmit.get(1);

        _collector.emit(tuple, msgId);
    } else {
        try {
            Thread.sleep(1);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:16,代码来源:FeederSpout.java

示例4: nextTuple

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void nextTuple() {
    List<Object> toEmit = (List<Object>) InprocMessaging.pollMessage(_id);
    if(toEmit!=null) {
        List<Object> tuple = (List<Object>) toEmit.get(0);
        Object msgId = toEmit.get(1);
        
        _collector.emit(tuple, msgId);
    } else {
        try {
            Thread.sleep(1);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
 
开发者ID:metamx,项目名称:incubator-storm,代码行数:16,代码来源:FeederSpout.java

示例5: FeederSpout

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public FeederSpout(Fields outFields) {
	_id = InprocMessaging.acquireNewPort();
	_outFields = outFields;
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:5,代码来源:FeederSpout.java

示例6: feed

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void feed(List<Object> tuple, Object msgId) {
	InprocMessaging.sendMessage(_id, new Values(tuple, msgId));
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:4,代码来源:FeederSpout.java

示例7: FeederSpout

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public FeederSpout(Fields outFields) {
    _id = InprocMessaging.acquireNewPort();
    _outFields = outFields;
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:5,代码来源:FeederSpout.java

示例8: feed

import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void feed(List<Object> tuple, Object msgId) {
    InprocMessaging.sendMessage(_id, new Values(tuple, msgId));
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:4,代码来源:FeederSpout.java


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