Github user koeninger commented on a diff in the pull request:
    --- Diff: 
    @@ -232,6 +232,42 @@ private[kafka010] case class KafkaSource(
       override def toString(): String = s"KafkaSource[$consumerStrategy]"
    +   * Set consumer position to specified offsets, making sure all 
assignments are set.
    +   */
    +  private def fetchSpecificStartingOffsets(
    +      partitionOffsets: Map[TopicPartition, Long]): Map[TopicPartition, 
Long] =
    +    withRetriesWithoutInterrupt {
    +      // Poll to get the latest assigned partitions
    +      consumer.poll(0)
    +      val partitions = consumer.assignment()
    +      consumer.pause(partitions)
    +      assert(partitions.asScala == partitionOffsets.keySet,
    +        "If startingOffsets contains specific offsets, you must specify 
all TopicPartitions.\n" +
    +          "Use -1 for latest, -2 for earliest, if you don't care.\n" +
    --- End diff --
    That was pretty much direct from Michael's suggestion on the -1 -2 feature. 
 I don't care either way about "don't care" ;)

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to