本文整理了Java中backtype.storm.utils.Utils.tuple()
方法的一些代码示例,展示了Utils.tuple()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.tuple()
方法的具体详情如下:
包路径:backtype.storm.utils.Utils
类名称:Utils
方法名:tuple
暂无
代码示例来源:origin: alibaba/jstorm
public List<Object> deserialize(byte[] ser) {
return tuple(ser);
}
代码示例来源:origin: alibaba/mdrill
public List<Object> deserialize(byte[] ser) {
return tuple(ser);
}
代码示例来源:origin: alibaba/jstorm
@Override
public Iterable<List<Object>> deserialize(byte[] ser) {
return asList(tuple(ser));
}
代码示例来源:origin: alibaba/jstorm
public void execute(Tuple input, BasicOutputCollector collector) {
String word = (String) input.getValues().get(0);
int count = 0;
if (_counts.containsKey(word)) {
count = _counts.get(word);
}
count++;
_counts.put(word, count);
collector.emit(tuple(word, count));
}
代码示例来源:origin: alibaba/jstorm
@SuppressWarnings("unchecked")
public Iterable<List<Object>> generateTuples(Message msg) {
Iterable<List<Object>> tups = null;
ByteBuffer payload = msg.payload();
if (payload == null) {
return null;
}
tups = Arrays.asList(Utils.tuple(Utils.toByteArray(payload)));
return tups;
}
代码示例来源:origin: alibaba/mdrill
public void execute(Tuple input, BasicOutputCollector collector) {
String word = (String) input.getValues().get(0);
int count = 0;
if(_counts.containsKey(word)) {
count = _counts.get(word);
}
count++;
_counts.put(word, count);
collector.emit(tuple(word, count));
}
代码示例来源:origin: alibaba/jstorm
public void execute(Tuple input) {
String word = (String) input.getValues().get(0);
int count = (Integer) input.getValues().get(1);
_counts.put(word, count);
int globalCount = 0;
for (String w : _counts.keySet()) {
globalCount += _counts.get(w);
}
_collector.emit(tuple(globalCount));
_collector.ack(input);
}
代码示例来源:origin: alibaba/mdrill
public void execute(Tuple input) {
String word = (String) input.getValues().get(0);
int count = (Integer) input.getValues().get(1);
_counts.put(word, count);
int globalCount = 0;
for(String w: _counts.keySet()) {
globalCount+=_counts.get(w);
}
_collector.emit(tuple(globalCount));
_collector.ack(input);
}
代码示例来源:origin: alibaba/mdrill
public void execute(Tuple input) {
_count++;
_collector.emit(tuple(_count));
_collector.ack(input);
}
代码示例来源:origin: com.twitter.heron/heron-storm
public List<Object> deserialize(byte[] ser) {
return tuple(ser);
}
代码示例来源:origin: com.n3twork.storm/storm-core
public List<Object> deserialize(byte[] ser) {
return tuple(ser);
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public List<Object> deserialize(byte[] ser) {
return tuple(ser);
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
@Override
public Iterable<List<Object>> deserialize(byte[] ser) {
return asList(tuple(ser));
}
代码示例来源:origin: com.n3twork.storm/storm-core
@Override
public Iterable<List<Object>> deserialize(byte[] ser) {
return asList(tuple(ser));
}
代码示例来源:origin: com.twitter.heron/heron-storm
@Override
public Iterable<List<Object>> deserialize(byte[] ser) {
return asList(tuple(ser));
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public void execute(Tuple input, BasicOutputCollector collector) {
String word = (String) input.getValues().get(0);
int count = 0;
if (_counts.containsKey(word)) {
count = _counts.get(word);
}
count++;
_counts.put(word, count);
collector.emit(tuple(word, count));
}
代码示例来源:origin: com.n3twork.storm/storm-core
public void execute(Tuple input, BasicOutputCollector collector) {
String word = (String) input.getValues().get(0);
int count = 0;
if(_counts.containsKey(word)) {
count = _counts.get(word);
}
count++;
_counts.put(word, count);
collector.emit(tuple(word, count));
}
代码示例来源:origin: Allianzcortex/code_collection
@SuppressWarnings("unchecked")
public Iterable<List<Object>> generateTuples(Message msg) {
Iterable<List<Object>> tups = null;
ByteBuffer payload = msg.payload();
if (payload == null) {
return null;
}
tups = Arrays.asList(Utils.tuple(Utils.toByteArray(payload)));
return tups;
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public void execute(Tuple input) {
String word = (String) input.getValues().get(0);
int count = (Integer) input.getValues().get(1);
_counts.put(word, count);
int globalCount = 0;
for (String w : _counts.keySet()) {
globalCount += _counts.get(w);
}
_collector.emit(tuple(globalCount));
_collector.ack(input);
}
代码示例来源:origin: com.n3twork.storm/storm-core
public void execute(Tuple input) {
String word = (String) input.getValues().get(0);
int count = (Integer) input.getValues().get(1);
_counts.put(word, count);
int globalCount = 0;
for(String w: _counts.keySet()) {
globalCount+=_counts.get(w);
}
_collector.emit(tuple(globalCount));
_collector.ack(input);
}
内容来源于网络,如有侵权,请联系作者删除!