leilinen commented on issue #643: Offsets not available on leader URL: https://github.com/apache/incubator-hudi/issues/643#issuecomment-484482759 hi, @vinothchandar I made a test again. Firstly, stop HoodieDeltaStreamer program, and produce data into topic, then stop produce, delete all data of topic, continue to generate data into topic (that makes HoodieDeltaStreamer next consume offset invalid ) . Restart HoodieDeltaStreamer to consume data , it will consume data from next consume offset, which is not avaliable. It will throw a exception: ``` Exception in thread "main" org.apache.spark.SparkException: Offsets not available on leader: OffsetRange(topic: 'll_binlog_hudi_test2', partition: 0, range: [1081027 -> 1581027]) at org.apache.spark.streaming.kafka.KafkaUtils$.org$apache$spark$streaming$kafka$KafkaUtils$$checkOffsets(KafkaUtils.scala:200) at org.apache.spark.streaming.kafka.KafkaUtils$$anonfun$createRDD$1.apply(KafkaUtils.scala:253) at org.apache.spark.streaming.kafka.KafkaUtils$$anonfun$createRDD$1.apply(KafkaUtils.scala:249) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112) at org.apache.spark.SparkContext.withScope(SparkContext.scala:701) at org.apache.spark.streaming.kafka.KafkaUtils$.createRDD(KafkaUtils.scala:249) at org.apache.spark.streaming.kafka.KafkaUtils$$anonfun$createRDD$3.apply(KafkaUtils.scala:338) at org.apache.spark.streaming.kafka.KafkaUtils$$anonfun$createRDD$3.apply(KafkaUtils.scala:333) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151) at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112) at org.apache.spark.SparkContext.withScope(SparkContext.scala:701) at org.apache.spark.streaming.kafka.KafkaUtils$.createRDD(KafkaUtils.scala:333) at org.apache.spark.streaming.kafka.KafkaUtils.createRDD(KafkaUtils.scala) at com.uber.hoodie.utilities.sources.AvroKafkaSource.toAvroRDD(AvroKafkaSource.java:44) at com.uber.hoodie.utilities.sources.KafkaSource.fetchNewData(KafkaSource.java:246) at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:168) at com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:311) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:782) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:207) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:232) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) ``` in **KafkaOffsetGen.getNextOffsetRanges()** method, the program does not check whether fromOffsets is available in topic . I think it should make a check before to consume.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
