关注 spark技术分享,
撸spark源码 玩spark最佳实践

KafkaOffsetRangeLimit

KafkaOffsetRangeLimit

KafkaOffsetRangeLimit is the desired offset range limits for starting, ending, and specific offsets.

Table 1. KafkaOffsetRangeLimits
KafkaOffsetRangeLimit Description

EarliestOffsetRangeLimit

Bind to the earliest offset

LatestOffsetRangeLimit

Bind to the latest offset

SpecificOffsetRangeLimit

Bind to specific offsets

Takes partitionOffsets (as Map[TopicPartition, Long]) when created.

KafkaOffsetRangeLimit is “created” (i.e. mapped to from a human-readable text representation) when KafkaSourceProvider is requested to getKafkaOffsetRangeLimit.

KafkaOffsetRangeLimit defines two constants to denote offset range limits that are resolved via Kafka:

  • -1L for the latest offset

  • -2L for the earliest offset

Note
KafkaOffsetRangeLimit is a Scala sealed trait which means that all the extensions are in the same compilation unit (a single file).
赞(0) 打赏
未经允许不得转载:spark技术分享 » KafkaOffsetRangeLimit
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏