Apache Storm Trident和Kafka Integration的Spout错误

时间:2018-05-24 08:56:41

标签: java nullpointerexception apache-kafka apache-storm trident

我正在使用OpaqueTridentKafkaSpout来使用来自Kafka的消息。下面是代码。我忽略了max spout pending配置,因为这会导致相同的kafka消息多次到达。

TridentKafkaConfig tridentKafkaConfig = new TridentKafkaConfig(hosts,properties.getProperty("topic", "mytopic"));
tridentKafkaConfig.scheme = new SchemeAsMultiScheme(new StringScheme());
OpaqueTridentKafkaSpout kafkaSpout = new OpaqueTridentKafkaSpout(tridentKafkaConfig);

我在Kafka Spout开始时遇到以下错误,但之后运行顺利。

  

2018-05-29 09:47:21.703 o.a.s.util   Thread-9-spout-myspout-Spout-executor [33 33] [ERROR]异步循环死了!   java.lang.RuntimeException:java.lang.NullPointerException           在org.apache.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:522)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:487)   〜[风暴芯1.2.1.jar:1.2.1]           at org.apache.storm.disruptor $ consume_batch_when_available.invoke(disruptor.clj:74)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.daemon.executor $ fn__5043 $ fn__5056 $ fn__5109.invoke(executor.clj:861)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.util $ async_loop $ fn__557.invoke(util.clj:484)   [风暴芯1.2.1.jar:1.2.1]           在clojure.lang.AFn.run(AFn.java:22)[clojure-1.7.0.jar:?]           在java.lang.Thread.run(Thread.java:748)[?:1.8.0_171]引起:java.lang.NullPointerException           在org.apache.storm.kafka.spout.trident.KafkaTridentSpoutEmitter.seek(KafkaTridentSpoutEmitter.java:193)   〜[stormjar.jar:?]           在org.apache.storm.kafka.spout.trident.KafkaTridentSpoutEmitter.emitPartitionBatch(KafkaTridentSpoutEmitter.java:127)   〜[stormjar.jar:?]           在org.apache.storm.kafka.spout.trident.KafkaTridentSpoutEmitter.emitPartitionBatch(KafkaTridentSpoutEmitter.java:51)   〜[stormjar.jar:?]           在org.apache.storm.trident.spout.OpaquePartitionedTridentSpoutExecutor $ Emitter.emitBatch(OpaquePartitionedTridentSpoutExecutor.java:141)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.trident.spout.TridentSpoutExecutor.execute(TridentSpoutExecutor.java:82)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.trident.topology.TridentBoltExecutor.execute(TridentBoltExecutor.java:383)   〜[风暴芯1.2.1.jar:1.2.1]           at org.apache.storm.daemon.executor $ fn__5043 $ tuple_action_fn__5045.invoke(executor.clj:739)   〜[风暴芯1.2.1.jar:1.2.1]           at org.apache.storm.daemon.executor $ mk_task_receiver $ fn__4964.invoke(executor.clj:468)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.disruptor $ clojure_handler $ reify__4475.onEvent(disruptor.clj:41)   〜[风暴芯1.2.1.jar:1.2.1]           在org.apache.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:509)   〜[风暴芯1.2.1.jar:1.2.1]           ......还有6个

对此有何建议?

1 个答案:

答案 0 :(得分:1)

您的堆栈跟踪表明您正在点击https://issues.apache.org/jira/browse/STORM-3046