mirror of https://github.com/apache/kafka.git
MINOR: KIP-161 upgrade docs change
Author: Guozhang Wang <wangguoz@gmail.com> Reviewers: Damian Guy <damian.guy@gmail.com> Closes #4036 from guozhangwang/KMinor-kip-161-docs
This commit is contained in:
parent
51063441d3
commit
e2e8d4a57a
|
@ -45,7 +45,6 @@
|
|||
</p>
|
||||
|
||||
<h3><a id="streams_api_changes_100" href="#streams_api_changes_100">Streams API changes in 1.0.0</a></h3>
|
||||
<!-- TODO: 161, 167, 173, 182 -->
|
||||
|
||||
<p>
|
||||
With 1.0 a major API refactoring was accomplished and the new API is cleaner and easier to use.
|
||||
|
@ -86,34 +85,31 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
With the introduction of <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-202+Move+merge%28%29+from+StreamsBuilder+to+KStream">KIP-202</a>
|
||||
New methods in <code>KStream</code>:
|
||||
</p>
|
||||
<ul>
|
||||
<li>With the introduction of <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-202+Move+merge%28%29+from+StreamsBuilder+to+KStream">KIP-202</a>
|
||||
a new method <code>merge()</code> has been created in <code>KStream</code> as the StreamsBuilder class's <code>StreamsBuilder#merge()</code> has been removed.
|
||||
The method signature was also changed, too: instead of providing multiple <code>KStream</code>s into the method at the once, only a single <code>KStream</code> is accepted.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
New methods in <code>KafkaStreams</code>:
|
||||
</p>
|
||||
<ul>
|
||||
<li>retrieve the current runtime information about the local threads via <code>#localThreadsMetadata()</code> </li>
|
||||
<li>observe the restoration of all state stores via <code>#setGlobalStateRestoreListener()</code>, in which users can provide their customized implementation of the <code>org.apache.kafka.streams.processor.StateRestoreListener</code> interface</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Deprecated methods in <code>KafkaStreams</code>:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>toString()</code></li>
|
||||
<li><code>toString(final String indent)</code></li>
|
||||
</ul>
|
||||
<p>
|
||||
Previously the above methods were used to return static and runtime information.
|
||||
<li><code>toString()</code>, <code>toString(final String indent)</code> were previously used to return static and runtime information.
|
||||
They have been deprecated in favor of using the new classes/methods <code>#localThreadsMetadata()</code> / <code>ThreadMetadata</code> (returning runtime information) and
|
||||
<code>TopologyDescription</code> / <code>Topology#describe()</code> (returning static information).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
More deprecated methods in <code>KafkaStreams</code>:
|
||||
</p>
|
||||
<ul>
|
||||
</li>
|
||||
<li>With the introduction of <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-182%3A+Reduce+Streams+DSL+overloads+and+allow+easier+use+of+custom+storage+engines">KIP-182</a>
|
||||
you should no longer pass in <code>Serde</code> to <code>KStream#print</code> operations.
|
||||
If you can't rely on using <code>toString</code> to print your keys an values, you should instead you provide a custom <code>KeyValueMapper</code> via the <code>Printed#withKeyValueMapper</code> call.
|
||||
|
@ -124,6 +120,7 @@
|
|||
Note: the previous aggregate functions on <code>KGroupedStream</code> still work, but have been deprecated.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Modified methods in <code>Processor</code>:
|
||||
</p>
|
||||
|
@ -154,6 +151,13 @@
|
|||
Detailed metrics sensor can be found in the <a href="#kafka_streams_monitoring">Streams Monitoring</a> section.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The introduction of <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-161%3A+streams+deserialization+exception+handlers">KIP-161</a>
|
||||
enables you to provide a default exception handler for deserialization errors when reading data from Kafka rather than throwing the exception all the way out of your streams application.
|
||||
You can provide the configs via the <code>StreamsConfig</code> as <code>StreamsConfig#DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG</code>.
|
||||
The specified handler must implement the <code>org.apache.kafka.streams.errors.DeserializationExceptionHandler</code> interface.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The introduction of <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-173%3A+Add+prefix+to+StreamsConfig+to+enable+setting+default+internal+topic+configs">KIP-173</a>
|
||||
enables you to provide topic configuration parameters for any topics created by Kafka Streams.
|
||||
|
|
Loading…
Reference in New Issue