简体   繁体   English

org.apache.kafka.streams.examples.wordcount.WordCountDemo不终止

[英]org.apache.kafka.streams.examples.wordcount.WordCountDemo does not terminate

I have launched this script and it does not end.我已经启动了这个脚本,但它并没有结束。

sudo ./bin/kafka-run-class.sh org.apache.kafka.streams.examples.wordcount.WordCountDemo

Here is the result:这是结果:

[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)

It does not end.它没有结束。

Is ther any solution please?请问有什么解决办法吗?

This is the expected behaviour of the demo that you are using and you need to press ctrl-c to terminate the process.这是您正在使用的演示的预期行为,您需要按 ctrl-c 来终止进程。


If you want the demo to stop after five seconds you can use the older version of the demo that terminates after 5 seconds:如果您希望演示在五秒后停止,您可以使用在 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);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行 WordCount 示例的 GCP 数据流快速入门错误:未知生命周期阶段“.mainClass=org.apache.beam.examples.WordCount” - GCP Dataflow Quickstart error running WordCount example: Unknown lifecycle phase “.mainClass=org.apache.beam.examples.WordCount” 线程“main”org.apache.kafka.streams.errors.InvalidStateStoreException 中的异常: - Exception in thread "main" org.apache.kafka.streams.errors.InvalidStateStoreException: Kafka 流异常:org.apache.kafka.streams.errors.StreamsException - 反序列化异常处理程序 - Kafka streams Exception: org.apache.kafka.streams.errors.StreamsException - Deserialization exception handler 线程“StreamThread-1”中的异常org.apache.kafka.streams.errors.StreamsException:无法重新平衡 - Exception in thread “StreamThread-1” org.apache.kafka.streams.errors.StreamsException: Failed to rebalance kafka 流异常找不到 org.apache.kafka.common.serialization.Serdes$WrapperSerde 的公共无参数构造函数 - kafka streams exception Could not find a public no-argument constructor for org.apache.kafka.common.serialization.Serdes$WrapperSerde Apache Kafka Consumer-从控制台终止 - Apache Kafka Consumer - terminate from console Apache Kafka Streams构建和启动jar - Apache Kafka Streams building and starting jar Apache Kafka Streams API或生产者/消费者API - Apache Kafka Streams API or Producer/Consumer APIs org.apache.kafka.common.errors.UnknownTopicOrPartitionException:此服务器未托管此主题分区 - org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition NoClassDefFound-组织/ apache / kafka / clients / producer / KafkaProducer - NoClassDefFound - org/apache/kafka/clients/producer/KafkaProducer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM