我已经启动了这个脚本,但它并没有结束。
sudo ./bin/kafka-run-class.sh org.apache.kafka.streams.examples.wordcount.WordCountDemo
这是结果:
[cloudera@quickstart kafka_2.12-2.4.1]$ sudo ./bin/kafka-run-class.sh org.apache.kafka.streams.examples.wordcount.WordCountDemo
[2020-04-14 13:26:36,153] WARN The configuration 'admin.retries' was supplied but isn't a known config. (org.apache.kafka.clients.consumer.ConsumerConfig)
[2020-04-14 13:26:36,165] WARN The configuration 'admin.retry.backoff.ms' was supplied but isn't a known config. (org.apache.kafka.clients.consumer.ConsumerConfig)
事情并没有结束。
请问有什么解决办法吗?
最佳答案
这是 demo that you are using 的预期行为并且您需要按 ctrl-c 来终止该进程。
<小时/>如果您希望演示在五秒后停止,您可以使用 older version 5 秒后终止的演示:
// usually the stream application would be running forever,
// in this example we just let it run for some time and stop since the input data is finite.
Thread.sleep(5000L);
关于java - org.apache.kafka.streams.examples.wordcount.WordCountDemo 不会终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61217095/