MCPcopy Create free account
hub / github.com/apache/storm / execute

Method execute

storm-client/src/jvm/org/apache/storm/drpc/JoinResult.java:47–67  ·  view source on GitHub ↗
(Tuple tuple)

Source from the content-addressed store, hash-verified

45 }
46
47 @Override
48 public void execute(Tuple tuple) {
49 Object requestId = tuple.getValue(0);
50 if (tuple.getSourceComponent().equals(returnComponent)) {
51 returns.put(requestId, tuple);
52 } else {
53 results.put(requestId, tuple);
54 }
55
56 if (returns.containsKey(requestId) && results.containsKey(requestId)) {
57 Tuple result = results.remove(requestId);
58 Tuple returner = returns.remove(requestId);
59 LOG.debug(result.getValue(1).toString());
60 List<Tuple> anchors = new ArrayList<>();
61 anchors.add(result);
62 anchors.add(returner);
63 collector.emit(anchors, new Values("" + result.getValue(1), returner.getValue(1)));
64 collector.ack(result);
65 collector.ack(returner);
66 }
67 }
68
69 @Override
70 public void declareOutputFields(OutputFieldsDeclarer declarer) {

Callers

nothing calls this directly

Calls 11

getValueMethod · 0.65
getSourceComponentMethod · 0.65
putMethod · 0.65
removeMethod · 0.65
debugMethod · 0.65
addMethod · 0.65
emitMethod · 0.65
ackMethod · 0.65
equalsMethod · 0.45
containsKeyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected