:: Experimental :: Represents any object that can commit a collection of OffsetRanges.
:: Experimental :: Represents any object that can commit a collection of OffsetRanges. The direct Kafka DStream implements this interface (see KafkaUtils.createDirectStream).
val stream = KafkaUtils.createDirectStream(...) ... stream.asInstanceOf[CanCommitOffsets].commitAsync(offsets, new OffsetCommitCallback() { def onComplete(m: java.util.Map[TopicPartition, OffsetAndMetadata], e: Exception) { if (null != e) { // error } else { // success } } })
:: Experimental :: Choice of how to create and configure underlying Kafka Consumers on driver and executors.
:: Experimental :: Choice of how to create and configure underlying Kafka Consumers on driver and executors. See ConsumerStrategies to obtain instances. Kafka 0.10 consumers can require additional, sometimes complex, setup after object instantiation. This interface encapsulates that process, and allows it to be checkpointed.
type of Kafka message key
type of Kafka message value
Represents any object that has a collection of OffsetRanges.
Represents any object that has a collection of OffsetRanges. This can be used to access the offset ranges in RDDs generated by the direct Kafka DStream (see KafkaUtils.createDirectStream).
KafkaUtils.createDirectStream(...).foreachRDD { rdd => val offsetRanges = rdd.asInstanceOf[HasOffsetRanges].offsetRanges ... }
:: Experimental :: Choice of how to schedule consumers for a given TopicPartition on an executor.
:: Experimental :: Choice of how to schedule consumers for a given TopicPartition on an executor. See LocationStrategies to obtain instances. Kafka 0.10 consumers prefetch messages, so it's important for performance to keep cached consumers on appropriate executors, not recreate them for every partition. Choice of location is only a preference, not an absolute; partitions may be scheduled elsewhere.
Represents a range of offsets from a single Kafka TopicPartition.
Represents a range of offsets from a single Kafka TopicPartition. Instances of this class
can be created with OffsetRange.create()
.
:: Experimental :: object for obtaining instances of ConsumerStrategy
:: Experimental :: object for obtaining instances of ConsumerStrategy
:: Experimental :: object for constructing Kafka streams and RDDs
:: Experimental :: object for constructing Kafka streams and RDDs
:: Experimental :: object to obtain instances of LocationStrategy
:: Experimental :: object to obtain instances of LocationStrategy
Companion object the provides methods to create instances of OffsetRange.
Spark Integration for Kafka 0.10