[jira] [Updated] (SPARK-20037) impossible to set kafka offsets using kafka 0.10 and spark 2.0.0
[ https://issues.apache.org/jira/browse/SPARK-20037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Nuriyev updated SPARK-20037: --- Attachment: Main.java > impossible to set kafka offsets using kafka 0.10 and spark 2.0.0 > > > Key: SPARK-20037 > URL: https://issues.apache.org/jira/browse/SPARK-20037 > Project: Spark > Issue Type: Bug > Components: Input/Output >Affects Versions: 2.0.0 >Reporter: Daniel Nuriyev > Attachments: Main.java, offsets.png > > > I use kafka 0.10.1 and java code with the following dependencies: > > org.apache.kafka > kafka_2.11 > 0.10.1.1 > > > org.apache.kafka > kafka-clients > 0.10.1.1 > > > org.apache.spark > spark-streaming_2.11 > 2.0.0 > > > org.apache.spark > spark-streaming-kafka-0-10_2.11 > 2.0.0 > > The code tries to read the a topic starting with offsets. > The topic has 4 partitions that start somewhere before 585000 and end after > 674000. So I wanted to read all partitions starting with 585000 > fromOffsets.put(new TopicPartition(topic, 0), 585000L); > fromOffsets.put(new TopicPartition(topic, 1), 585000L); > fromOffsets.put(new TopicPartition(topic, 2), 585000L); > fromOffsets.put(new TopicPartition(topic, 3), 585000L); > Using 5 second batches: > jssc = new JavaStreamingContext(conf, Durations.seconds(5)); > The code immediately throws: > Beginning offset 585000 is after the ending offset 584464 for topic > commerce_item_expectation partition 1 > It does not make sense because this topic/partition starts at 584464, not ends > I use this as a base: > https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html > But I use direct stream: > KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), > ConsumerStrategies.Subscribe( > topics, kafkaParams, fromOffsets > ) > ) -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-20037) impossible to set kafka offsets using kafka 0.10 and spark 2.0.0
[ https://issues.apache.org/jira/browse/SPARK-20037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Nuriyev updated SPARK-20037: --- Attachment: offsets.png > impossible to set kafka offsets using kafka 0.10 and spark 2.0.0 > > > Key: SPARK-20037 > URL: https://issues.apache.org/jira/browse/SPARK-20037 > Project: Spark > Issue Type: Bug > Components: Input/Output >Affects Versions: 2.0.0 >Reporter: Daniel Nuriyev > Attachments: offsets.png > > > I use kafka 0.10.1 and java code with the following dependencies: > > org.apache.kafka > kafka_2.11 > 0.10.1.1 > > > org.apache.kafka > kafka-clients > 0.10.1.1 > > > org.apache.spark > spark-streaming_2.11 > 2.0.0 > > > org.apache.spark > spark-streaming-kafka-0-10_2.11 > 2.0.0 > > The code tries to read the a topic starting with offsets. > The topic has 4 partitions that start somewhere before 585000 and end after > 674000. So I wanted to read all partitions starting with 585000 > fromOffsets.put(new TopicPartition(topic, 0), 585000L); > fromOffsets.put(new TopicPartition(topic, 1), 585000L); > fromOffsets.put(new TopicPartition(topic, 2), 585000L); > fromOffsets.put(new TopicPartition(topic, 3), 585000L); > Using 5 second batches: > jssc = new JavaStreamingContext(conf, Durations.seconds(5)); > The code immediately throws: > Beginning offset 585000 is after the ending offset 584464 for topic > commerce_item_expectation partition 1 > It does not make sense because this topic/partition starts at 584464, not ends > I use this as a base: > https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html > But I use direct stream: > KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), > ConsumerStrategies.Subscribe( > topics, kafkaParams, fromOffsets > ) > ) -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-20037) impossible to set kafka offsets using kafka 0.10 and spark 2.0.0
[ https://issues.apache.org/jira/browse/SPARK-20037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Owen updated SPARK-20037: -- Target Version/s: (was: 2.0.0) Priority: Major (was: Critical) Fix Version/s: (was: 2.0.3) > impossible to set kafka offsets using kafka 0.10 and spark 2.0.0 > > > Key: SPARK-20037 > URL: https://issues.apache.org/jira/browse/SPARK-20037 > Project: Spark > Issue Type: Bug > Components: Input/Output >Affects Versions: 2.0.0 >Reporter: Daniel Nuriyev > > I use kafka 0.10.1 and java code with the following dependencies: > > org.apache.kafka > kafka_2.11 > 0.10.1.1 > > > org.apache.kafka > kafka-clients > 0.10.1.1 > > > org.apache.spark > spark-streaming_2.11 > 2.0.0 > > > org.apache.spark > spark-streaming-kafka-0-10_2.11 > 2.0.0 > > The code tries to read the a topic starting with offsets. > The topic has 4 partitions that start somewhere before 585000 and end after > 674000. So I wanted to read all partitions starting with 585000 > fromOffsets.put(new TopicPartition(topic, 0), 585000L); > fromOffsets.put(new TopicPartition(topic, 1), 585000L); > fromOffsets.put(new TopicPartition(topic, 2), 585000L); > fromOffsets.put(new TopicPartition(topic, 3), 585000L); > Using 5 second batches: > jssc = new JavaStreamingContext(conf, Durations.seconds(5)); > The code immediately throws: > Beginning offset 585000 is after the ending offset 584464 for topic > commerce_item_expectation partition 1 > It does not make sense because this topic/partition starts at 584464, not ends > I use this as a base: > https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html > But I use direct stream: > KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), > ConsumerStrategies.Subscribe( > topics, kafkaParams, fromOffsets > ) > ) -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-20037) impossible to set kafka offsets using kafka 0.10 and spark 2.0.0
[ https://issues.apache.org/jira/browse/SPARK-20037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Nuriyev updated SPARK-20037: --- Description: I use kafka 0.10.1 and java code with the following dependencies: org.apache.kafka kafka_2.11 0.10.1.1 org.apache.kafka kafka-clients 0.10.1.1 org.apache.spark spark-streaming_2.11 2.0.0 org.apache.spark spark-streaming-kafka-0-10_2.11 2.0.0 The code tries to read the a topic starting with offsets. The topic has 4 partitions that start somewhere before 585000 and end after 674000. So I wanted to read all partitions starting with 585000 fromOffsets.put(new TopicPartition(topic, 0), 585000L); fromOffsets.put(new TopicPartition(topic, 1), 585000L); fromOffsets.put(new TopicPartition(topic, 2), 585000L); fromOffsets.put(new TopicPartition(topic, 3), 585000L); Using 5 second batches: jssc = new JavaStreamingContext(conf, Durations.seconds(5)); The code immediately throws: Beginning offset 585000 is after the ending offset 584464 for topic commerce_item_expectation partition 1 It does not make sense because this topic/partition starts at 584464, not ends I use this as a base: https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html But I use direct stream: KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), ConsumerStrategies.Subscribe( topics, kafkaParams, fromOffsets ) ) was: I use kafka 0.10.1 and java code with the following dependencies: org.apache.kafka kafka_2.11 0.10.1.1 org.apache.kafka kafka-clients 0.10.1.1 org.apache.spark spark-streaming_2.11 2.0.0 org.apache.spark spark-streaming-kafka-0-10_2.11 2.0.0 The code tries to read the a topic starting with offsets. The topic has 4 partitions that start somewhere before 300 and end after 300. So I wanted to read all partitions starting with 300 fromOffsets.put(new TopicPartition(topic, 0), 300L); fromOffsets.put(new TopicPartition(topic, 1), 300L); fromOffsets.put(new TopicPartition(topic, 2), 300L); fromOffsets.put(new TopicPartition(topic, 3), 300L); Using 5 second batches: jssc = new JavaStreamingContext(conf, Durations.seconds(5)); The code immediately throws: numRecords must not be negative I use this as a base: https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html But I use direct stream: KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), ConsumerStrategies. Subscribe( topics, kafkaParams, fromOffsets ) ) > impossible to set kafka offsets using kafka 0.10 and spark 2.0.0 > > > Key: SPARK-20037 > URL: https://issues.apache.org/jira/browse/SPARK-20037 > Project: Spark > Issue Type: Bug > Components: Input/Output >Affects Versions: 2.0.0 >Reporter: Daniel Nuriyev >Priority: Critical > Fix For: 2.0.3 > > > I use kafka 0.10.1 and java code with the following dependencies: > > org.apache.kafka > kafka_2.11 > 0.10.1.1 > > > org.apache.kafka > kafka-clients > 0.10.1.1 > > > org.apache.spark > spark-streaming_2.11 > 2.0.0 > > > org.apache.spark > spark-streaming-kafka-0-10_2.11 > 2.0.0 > > The code tries to read the a topic starting with offsets. > The topic has 4 partitions that start somewhere before 585000 and end after > 674000. So I wanted to read all partitions starting with 585000 > fromOffsets.put(new TopicPartition(topic, 0), 585000L); > fromOffsets.put(new TopicPartition(topic, 1), 585000L); > fromOffsets.put(new TopicPartition(topic, 2), 585000L); > fromOffsets.put(new TopicPartition(topic, 3), 585000L); > Using 5 second batches: > jssc = new JavaStreamingContext(conf, Durations.seconds(5)); > The code immediately throws: > Beginning offset 585000 is after the ending offset 584464 for topic > commerce_item_expectation partition 1 > It does not make sense because this topic/partition starts at 584464, not ends > I use this as a base: > https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html > But I use direct stream: > KafkaUtils.createDirectStream(jssc,LocationStrategies.PreferConsistent(), > ConsumerStrategies. Subscribe( > topics, kafkaParams, fromOffsets > ) > ) -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org