--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/9e4b8f98-15f4-49da-88b0-d938d10e7849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The DSL does not expose partition information for an incoming record, but the Processor API does via the `ProcessorContext`, which is being updated for each incoming record.That is, within `Processor#process()`, you have access to a `ProcessorContext` instance that you can use to retrieve information such as the topic, partition, and offset of the current record (e.g. `ProcessorContext#partition()` and `ProcessorContext#offset()`).Hope this helps!Michael
On Thu, Feb 16, 2017 at 2:11 PM, 'Tianxiang Xiong' via Confluent Platform <confluent-platform@googlegroups.com> wrote:
In our Kafka Streams app (call it MyApp), we want to make sure that producers put messages on the right partitions. That is, given a message [K, V], we want to check that the partition of [K, V] is the same as that calculated with our Partitioner (let's say it's DefaultPartitioner), and that the producer isn't using a partitioning strategy different from what MyApp expects.Is there a way to validate this in the Kafka Streams app after sourcing a topic as a KStream? From what I can see, when applying a filter to the KStream, we get access to K and V, but not the partition that [K, V] was on.Some example code would be very helpful.
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsubscribe@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/9e4b8f98-15f4-49da-88b0-d938d10e7849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Michael G. NollProduct Manager | Confluent
And a few code pointers:https://github.com/confluentinc/examples/blob/3.1.x/kafka-streams/src/test/java/io/confluent/examples/streams/MixAndMatchLambdaIntegrationTest.java (which shows how to implement a `Processor`, and also how to integrate with the DSL)
On Thu, Feb 16, 2017 at 4:05 PM, Michael Noll <mic...@confluent.io> wrote:
On Thu, Feb 16, 2017 at 4:03 PM, Michael Noll <mic...@confluent.io> wrote:
The DSL does not expose partition information for an incoming record, but the Processor API does via the `ProcessorContext`, which is being updated for each incoming record.That is, within `Processor#process()`, you have access to a `ProcessorContext` instance that you can use to retrieve information such as the topic, partition, and offset of the current record (e.g. `ProcessorContext#partition()` and `ProcessorContext#offset()`).Hope this helps!Michael
On Thu, Feb 16, 2017 at 2:11 PM, 'Tianxiang Xiong' via Confluent Platform <confluent...@googlegroups.com> wrote:
In our Kafka Streams app (call it MyApp), we want to make sure that producers put messages on the right partitions. That is, given a message [K, V], we want to check that the partition of [K, V] is the same as that calculated with our Partitioner (let's say it's DefaultPartitioner), and that the producer isn't using a partitioning strategy different from what MyApp expects.Is there a way to validate this in the Kafka Streams app after sourcing a topic as a KStream? From what I can see, when applying a filter to the KStream, we get access to K and V, but not the partition that [K, V] was on.Some example code would be very helpful.
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/9e4b8f98-15f4-49da-88b0-d938d10e7849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Michael G. NollProduct Manager | Confluent
That's interesting, thanks.
A related issue: how is the Cluster for the partition method of DefaultPartitioner exposed?
On Thursday, 16 February 2017 16:09:51 UTC-8, Michael Noll wrote:
And a few code pointers:https://github.com/confluentinc/examples/blob/3.1.x/kafka-streams/src/test/java/io/confluent/examples/streams/MixAndMatchLambdaIntegrationTest.java (which shows how to implement a `Processor`, and also how to integrate with the DSL)
On Thu, Feb 16, 2017 at 4:05 PM, Michael Noll <mic...@confluent.io> wrote:
On Thu, Feb 16, 2017 at 4:03 PM, Michael Noll <mic...@confluent.io> wrote:
The DSL does not expose partition information for an incoming record, but the Processor API does via the `ProcessorContext`, which is being updated for each incoming record.That is, within `Processor#process()`, you have access to a `ProcessorContext` instance that you can use to retrieve information such as the topic, partition, and offset of the current record (e.g. `ProcessorContext#partition()` and `ProcessorContext#offset()`).Hope this helps!Michael
On Thu, Feb 16, 2017 at 2:11 PM, 'Tianxiang Xiong' via Confluent Platform <confluent...@googlegroups.com> wrote:
In our Kafka Streams app (call it MyApp), we want to make sure that producers put messages on the right partitions. That is, given a message [K, V], we want to check that the partition of [K, V] is the same as that calculated with our Partitioner (let's say it's DefaultPartitioner), and that the producer isn't using a partitioning strategy different from what MyApp expects.Is there a way to validate this in the Kafka Streams app after sourcing a topic as a KStream? From what I can see, when applying a filter to the KStream, we get access to K and V, but not the partition that [K, V] was on.Some example code would be very helpful.
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsubscribe@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/9e4b8f98-15f4-49da-88b0-d938d10e7849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Michael G. NollProduct Manager | Confluent
--Michael G. NollProduct Manager | Confluent
--Michael G. NollProduct Manager | Confluent
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/07e846ab-d563-4759-864e-40855db4c460%40googlegroups.com.
That's interesting, thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/9e4b8f98-15f4-49da-88b0-d938d10e7849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Michael G. NollProduct Manager | Confluent
--Michael G. NollProduct Manager | Confluent
--Michael G. NollProduct Manager | Confluent
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/07e846ab-d563-4759-864e-40855db4c460%40googlegroups.com.
> confluent-platform+unsub...@googlegroups.com <javascript:>.
> To post to this group, send email to
> confluent...@googlegroups.com <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/confluent-platform/07e846ab-d563-4759-864e-40855db4c460%40googlegroups.com
> <https://groups.google.com/d/msgid/confluent-platform/07e846ab-d563-4759-864e-40855db4c460%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> *Michael G. Noll*
> Product Manager | Confluent
> +1 650 453 5860 | @miguno <https://twitter.com/miguno>
> Follow us: Twitter <https://twitter.com/ConfluentInc> | Blog
> <http://www.confluent.io/blog>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Confluent Platform" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to confluent-platform+unsub...@googlegroups.com
> <mailto:confluent-platform+unsub...@googlegroups.com>.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/5b42f0f0-702a-4e92-9765-8e1eb1aef9b4%40googlegroups.com.
Ian.
You just worry about the general requirement that records are partitions correctly (what is a Streams requirement that holds for all Streams applications).
2. multiple topics must be consumed by the same KStream (even if this
is possible, in most cases, a single topic is consumed)
3(a). if multiple topics are consumed, the number of partitions is the
same over all topics (it's very likely that different topics do have a
different number of partitions, and this will trigger an internal
repartitioning before a key-based operation anyway)
>> > an email to confluent-platform+unsub...@googlegroups.com
>> > <mailto:confluent-platform+unsub...@googlegroups.com>.
>> > To post to this group, send email to
>> confluent...@googlegroups.com
>> > <mailto:confluent...@googlegroups.com>.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/confluent-platform/d5aee37d-73dd-4774-8ed9-6e97933a1f50%40googlegroups.com
>> <https://groups.google.com/d/msgid/confluent-platform/d5aee37d-73dd-4774-8ed9-6e97933a1f50%40googlegroups.com>
>>
>> >
>> <https://groups.google.com/d/msgid/confluent-platform/d5aee37d-73dd-4774-8ed9-6e97933a1f50%40googlegroups.com?utm_medium=email&utm_source=footer
>> <https://groups.google.com/d/msgid/confluent-platform/d5aee37d-73dd-4774-8ed9-6e97933a1f50%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>>
>> > For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Confluent Platform" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to confluent-platform+unsub...@googlegroups.com
>> <javascript:>.
>> To post to this group, send email to confluent...@googlegroups.com
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/confluent-platform/5b42f0f0-702a-4e92-9765-8e1eb1aef9b4%40googlegroups.com
>> <https://groups.google.com/d/msgid/confluent-platform/5b42f0f0-702a-4e92-9765-8e1eb1aef9b4%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Confluent Platform" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to confluent-platform+unsub...@googlegroups.com
> <mailto:confluent-platform+unsub...@googlegroups.com>.