mirror of https://github.com/apache/kafka.git
MINOR: remove transform and through from repartition description (#19291)
`transform` and `through` are removed in 4.0. Since users cannot reference them in 4.0 document, it's not good to keep using them as example in `repartition` description. Reviewers: Matthias J. Sax <matthias@confluent.io>
This commit is contained in:
parent
8de7b69ced
commit
33fa572a1c
|
@ -764,10 +764,10 @@ KTable<byte[], String> table = stream.toTable();</code></pre>
|
||||||
<td>
|
<td>
|
||||||
<p class="first">Manually trigger repartitioning of the stream with desired number of partitions. (<a class="reference external" href="/{{version}}/javadoc/org/apache/kafka/streams/kstream/KStream.html#repartition--">details</a>)</p>
|
<p class="first">Manually trigger repartitioning of the stream with desired number of partitions. (<a class="reference external" href="/{{version}}/javadoc/org/apache/kafka/streams/kstream/KStream.html#repartition--">details</a>)</p>
|
||||||
|
|
||||||
<code><span class="pre">repartition()</span></code> is similar to <code><span class="pre">through()</span></code> however Kafka Streams will manage the topic for you.
|
Kafka Streams will manage the topic for <code><span class="pre">repartition()</span></code>.
|
||||||
Generated topic is treated as internal topic, as a result data will be purged automatically as any other internal repartition topic.
|
Generated topic is treated as internal topic, as a result data will be purged automatically as any other internal repartition topic.
|
||||||
In addition, you can specify the desired number of partitions, which allows to easily scale in/out downstream sub-topologies.
|
In addition, you can specify the desired number of partitions, which allows to easily scale in/out downstream sub-topologies.
|
||||||
<code><span class="pre">repartition()</span></code> operation always triggers repartitioning of the stream, as a result it can be used with embedded Processor API methods (like <code><span class="pre">transform()</span></code> et al.) that do not trigger auto repartitioning when key changing operation is performed beforehand.
|
<code><span class="pre">repartition()</span></code> operation always triggers repartitioning of the stream, as a result it can be used with embedded Processor API methods (like <code><span class="pre">process()</span></code> et al.) that do not trigger auto repartitioning when key changing operation is performed beforehand.
|
||||||
|
|
||||||
<pre class="line-numbers"><code class="language-java">KStream<byte[], String> stream = ... ;
|
<pre class="line-numbers"><code class="language-java">KStream<byte[], String> stream = ... ;
|
||||||
KStream<byte[], String> repartitionedStream = stream.repartition(Repartitioned.numberOfPartitions(10));</code></pre>
|
KStream<byte[], String> repartitionedStream = stream.repartition(Repartitioned.numberOfPartitions(10));</code></pre>
|
||||||
|
|
Loading…
Reference in New Issue