Member since
05-09-2016
2
Posts
0
Kudos Received
0
Solutions
05-10-2016
04:36 AM
that worked! thanks for the explanation
... View more
05-10-2016
04:14 AM
I’m having an issue with my Storm topology. Everytime I process the tuple I get the following exception: Caused by: java.lang.IllegalArgumentException: word does not exist
at backtype.storm.tuple.Fields.fieldIndex(Fields.java:78)
at backtype.storm.tuple.TupleImpl.fieldIndex(TupleImpl.java:100)
at backtype.storm.tuple.TupleImpl.getStringByField(TupleImpl.java:153)
at TickFail.WordCounterBolt.execute(WordCounterBolt.java:48)
at backtype.storm.daemon.executor$fn__3697$tuple_action_fn__3699.invoke(executor.clj:670)
at backtype.storm.daemon.executor$mk_task_receiver$fn__3620.invoke(executor.clj:429)
at backtype.storm.disruptor$clojure_handler$reify__3196.onEvent(disruptor.clj:58)
at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:125)
I’m not sure whats happening, I think it has something to do with my tick tuple Here is the code for my execute method in my bolt: @Override
public void execute(Tuple tuple) {
String str = tuple.getStringByField("word");
if (isTickTuple(tuple)) {
emitCounters(tuple);
return;
}
..
Here is my tick tuple logic: @Override
public Map<String, Object> getComponentConfiguration() {
Config conf = new Config();
conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, 20);
return conf;
}
private boolean isTickTuple(Tuple tuple) {
String sourceComponent = tuple.getSourceComponent();
String sourceStreamId = tuple.getSourceStreamId();
return sourceComponent.equals(Constants.SYSTEM_COMPONENT_ID)
&& sourceStreamId.equals(Constants.SYSTEM_TICK_STREAM_ID);
}
... View more
Labels:
- Labels:
-
Apache Storm