本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例5: FeederSpout
import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public FeederSpout(Fields outFields) {
_id = InprocMessaging.acquireNewPort();
_outFields = outFields;
}
示例6: feed
import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void feed(List<Object> tuple, Object msgId) {
InprocMessaging.sendMessage(_id, new Values(tuple, msgId));
}
示例7: FeederSpout
import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public FeederSpout(Fields outFields) {
_id = InprocMessaging.acquireNewPort();
_outFields = outFields;
}
示例8: feed
import backtype.storm.utils.InprocMessaging; //导入依赖的package包/类
public void feed(List<Object> tuple, Object msgId) {
InprocMessaging.sendMessage(_id, new Values(tuple, msgId));
}