From e2e8d4a57a83693b946c3e26f9be2e41a7341ab4 Mon Sep 17 00:00:00 2001 From: Guozhang Wang Date: Fri, 6 Oct 2017 17:57:32 -0700 Subject: [PATCH] MINOR: KIP-161 upgrade docs change Author: Guozhang Wang Reviewers: Damian Guy Closes #4036 from guozhangwang/KMinor-kip-161-docs --- docs/streams/upgrade-guide.html | 42 ++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/streams/upgrade-guide.html b/docs/streams/upgrade-guide.html index 8e9f8ae719d..b7bf19a9b43 100644 --- a/docs/streams/upgrade-guide.html +++ b/docs/streams/upgrade-guide.html @@ -45,7 +45,6 @@

Streams API changes in 1.0.0

-

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 Topology#describe(). An example using this new API is shown in the quickstart section.

- +

- With the introduction of KIP-202 - a new method merge() has been created in KStream as the StreamsBuilder class's StreamsBuilder#merge() has been removed. - The method signature was also changed, too: instead of providing multiple KStreams into the method at the once, only a single KStream is accepted. -

- -

- New methods in KafkaStreams: + New methods in KStream:

    -
  • retrieve the current runtime information about the local threads via #localThreadsMetadata()
  • +
  • With the introduction of KIP-202 + a new method merge() has been created in KStream as the StreamsBuilder class's StreamsBuilder#merge() has been removed. + The method signature was also changed, too: instead of providing multiple KStreams into the method at the once, only a single KStream is accepted. +
+

- Deprecated methods in KafkaStreams: + New methods in KafkaStreams:

    -
  • toString()
  • -
  • toString(final String indent)
  • +
  • retrieve the current runtime information about the local threads via #localThreadsMetadata()
  • +
  • observe the restoration of all state stores via #setGlobalStateRestoreListener(), in which users can provide their customized implementation of the org.apache.kafka.streams.processor.StateRestoreListener interface
-

- Previously the above methods were used to return static and runtime information. - They have been deprecated in favor of using the new classes/methods #localThreadsMetadata() / ThreadMetadata (returning runtime information) and - TopologyDescription / Topology#describe() (returning static information). -

- More deprecated methods in KafkaStreams: + Deprecated methods in KafkaStreams:

    +
  • toString(), toString(final String indent) were previously used to return static and runtime information. + They have been deprecated in favor of using the new classes/methods #localThreadsMetadata() / ThreadMetadata (returning runtime information) and + TopologyDescription / Topology#describe() (returning static information). +
  • With the introduction of KIP-182 you should no longer pass in Serde to KStream#print operations. If you can't rely on using toString to print your keys an values, you should instead you provide a custom KeyValueMapper via the Printed#withKeyValueMapper call. @@ -124,6 +120,7 @@ Note: the previous aggregate functions on KGroupedStream still work, but have been deprecated.
+

Modified methods in Processor:

@@ -154,6 +151,13 @@ Detailed metrics sensor can be found in the Streams Monitoring section.

+

+ The introduction of KIP-161 + 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 StreamsConfig as StreamsConfig#DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG. + The specified handler must implement the org.apache.kafka.streams.errors.DeserializationExceptionHandler interface. +

+

The introduction of KIP-173 enables you to provide topic configuration parameters for any topics created by Kafka Streams.