Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache spark 即使在卡夫卡显示0消息延迟后,spark仍运行10小时_Apache Spark_Apache Kafka_Spark Streaming - Fatal编程技术网

Apache spark 即使在卡夫卡显示0消息延迟后,spark仍运行10小时

Apache spark 即使在卡夫卡显示0消息延迟后,spark仍运行10小时,apache-spark,apache-kafka,spark-streaming,Apache Spark,Apache Kafka,Spark Streaming,我正在运行spark streaming,它正在使用来自kafka的消息。我还在spark代码中定义了检查点目录 我们昨天在卡夫卡上传了大量信息。当我使用检查卡夫卡中的偏移状态时- bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --group xxx- \ streaming-consumer-group --zookeeper xxx.xxx.xxx.xxx:2181 它显示没有消息延迟。然而,我的spark作业在过去10小

我正在运行spark streaming,它正在使用来自kafka的消息。我还在spark代码中定义了检查点目录

我们昨天在卡夫卡上传了大量信息。当我使用检查卡夫卡中的偏移状态时-

bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --group xxx- \
streaming-consumer-group --zookeeper xxx.xxx.xxx.xxx:2181
它显示没有消息延迟。然而,我的spark作业在过去10小时内仍在运行

我的理解是spark流式代码应该按顺序读取消息,并相应地更新kafka中的偏移量


即使卡夫卡没有信息延迟,我也无法理解为什么spark仍在运行。有人能解释一下吗?

如果您使用的是直达流fom kafka,它不会更新kafka或zookeeper!!!spark UI显示了什么?spark UI是否显示许多活动的未切块批次?您是否在spark中启用了背压?如果您打开了spark ui,它将保持spark上下文打开。我必须找出理想的背压设置。我正在从kafka读取大量数据,并将处理后的数据存储在mysql中[我还使用flume在HDFS中创建了一个副本]。我需要做一些实验,大约300万行。关于我应该如何继续的任何想法?如果您使用的是直接流fom卡夫卡,它不会更新卡夫卡或zookeeper!!!spark UI显示了什么?spark UI是否显示许多活动的未切块批次?您是否在spark中启用了背压?如果您打开了spark ui,它将保持spark上下文打开。我必须找出理想的背压设置。我正在从kafka读取大量数据,并将处理后的数据存储在mysql中[我还使用flume在HDFS中创建了一个副本]。我需要做一些实验,大约300万行。我该怎么做有什么想法吗?