Repository: kafka Updated Branches: refs/heads/trunk 51063441d -> e2e8d4a57
MINOR: KIP-161 upgrade docs change Author: Guozhang Wang <wangg...@gmail.com> Reviewers: Damian Guy <damian....@gmail.com> Closes #4036 from guozhangwang/KMinor-kip-161-docs Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e2e8d4a5 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e2e8d4a5 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e2e8d4a5 Branch: refs/heads/trunk Commit: e2e8d4a57a83693b946c3e26f9be2e41a7341ab4 Parents: 5106344 Author: Guozhang Wang <wangg...@gmail.com> Authored: Fri Oct 6 17:57:32 2017 -0700 Committer: Guozhang Wang <wangg...@gmail.com> Committed: Fri Oct 6 17:57:32 2017 -0700 ---------------------------------------------------------------------- docs/streams/upgrade-guide.html | 42 ++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/e2e8d4a5/docs/streams/upgrade-guide.html ---------------------------------------------------------------------- diff --git a/docs/streams/upgrade-guide.html b/docs/streams/upgrade-guide.html index 8e9f8ae..b7bf19a 100644 --- a/docs/streams/upgrade-guide.html +++ b/docs/streams/upgrade-guide.html @@ -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. @@ -84,36 +83,33 @@ and can be obtained by calling <code>Topology#describe()</code>. An example using this new API is shown in the <a href="/{{version}}/documentation/streams/quickstart">quickstart section</a>. </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> - 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> - - <p> - New methods in <code>KafkaStreams</code>: + New methods in <code>KStream</code>: </p> <ul> - <li> retrieve the current runtime information about the local threads via <code>#localThreadsMetadata()</code> </li> + <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. + </li> </ul> + <p> - Deprecated methods in <code>KafkaStreams</code>: + New methods in <code>KafkaStreams</code>: </p> <ul> - <li><code>toString()</code></li> - <li><code>toString(final String indent)</code></li> + <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> - Previously the above methods were 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>: + Deprecated methods in <code>KafkaStreams</code>: </p> <ul> + <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). + </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> @@ -155,6 +152,13 @@ </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. This includes repartition and changelog topics.