This is an automated email from the ASF dual-hosted git repository. guozhang pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git The following commit(s) were added to refs/heads/trunk by this push: new c9161af MINOR: doc change for deprecate removal (#5006) c9161af is described below commit c9161afda998e42d8ee9ebbfe5e647ff337bd19b Author: Guozhang Wang AuthorDate: Tue May 15 20:26:19 2018 -0700 MINOR: doc change for deprecate removal (#5006) Reviewers: John Roesler , Bill Bejeck , Matthias J. Sax --- docs/streams/upgrade-guide.html | 100 +++++++++++++++++++--------------------- docs/upgrade.html | 69 ++++----------------------- 2 files changed, 58 insertions(+), 111 deletions(-) diff --git a/docs/streams/upgrade-guide.html b/docs/streams/upgrade-guide.html index 646908d..f6b237f 100644 --- a/docs/streams/upgrade-guide.html +++ b/docs/streams/upgrade-guide.html @@ -34,70 +34,46 @@

- If you want to upgrade from 1.1.x to 2.0.0 and you have customized window store implementations on the ReadOnlyWindowStore interface - you'd need to update your code to incorporate the newly added public APIs; otherwise you don't need to make any code changes. - See below for a complete list of 2.0.0 API and semantic changes that allow you to advance your application and/or simplify your code base. + Upgrading from any older version to 2.0.0 is possible: (1) you need to make sure to update you code accordingly, because there are some minor non-compatible API changes since older + releases (the code changes are expected to be minimal, please see below for the details), + (2) upgrading to 2.0.0 in the online mode requires two rolling bounces. + For (2), in the first rolling bounce phase users need to set config upgrade.from="older version" (possible values are "0.10.0", "0.10.1", "0.10.2", "0.11.0", "1.0", and "1.1") + (cf. KIP-268):

+
    +
  • prepare your application instances for a rolling bounce and make sure that config upgrade.from is set to the version from which it is being upgrade to new version 2.0.0
  • +
  • bounce each instance of your application once
  • +
  • prepare your newly deployed 2.0.0 application instances for a second round of rolling bounces; make sure to remove the value for config upgrade.mode
  • +
  • bounce each instance of your application once more to complete the upgrade
  • +
+

As an alternative, an offline upgrade is also possible. Upgrading from any versions as old as 0.10.0.x to 2.0.0 in offline mode require the following steps:

+
    +
  • stop all old (e.g., 0.10.0.x) application instances
  • +
  • update your code and swap old code and jar file with new code and new jar file
  • +
  • restart all new (2.0.0) application instances
  • +

- If you want to upgrade from 1.0.x to 2.0.0 and you have customized window store implementations on the ReadOnlyWindowStore interface - you'd need to update your code to incorporate the newly added public APIs. - Otherwise, if you are using Java 7 you don't need to make any code changes as the public API is fully backward compatible; - but if you are using Java 8 method references in your Kafka Streams code you might need to update your code to resolve method ambiguities. - Hot-swaping the jar-file only might not work for this case. - See below a complete list of 2.0.0 and 1.1.0 - API and semantic changes that allow you to advance your application and/or simplify your code base. + Note, that a brokers must be on version 0.10.1 or higher to run a Kafka Streams application version 0.10.1 or higher; + On-disk message format must be 0.10 or higher to run a Kafka Streams application version 1.0 or higher. + For Kafka Streams 0.10.0, broker version 0.10.0 or higher is required.

- If you want to upgrade from 0.10.2.x or 0.11.0.x to 2.0.x and you have customized window store implementations on the ReadOnlyWindowStore interface - you'd need to update your code to incorporate the newly added public APIs. - Otherwise, if you are using Java 7 you don't need to do any code changes as the public API is fully backward compatible; - but if you are using Java 8 method references in your Kafka Streams code you might need to update your code to resolve method ambiguities. - However, some public APIs were deprecated and thus it is recommended to update your code eventually to allow for future upgrades. - See below a complete list of 2.0, 1.1, - 1.0, and 0.11.0 API - and semantic changes that allow you to advance your application and/or simplify your code base, including the usage of new features. - Additionally, Streams API 1.1.x requires broker on-disk message format version 0.10 or higher; thus, you need to make sure that the message - format is configured correctly before you upgrade your Kafka Streams application. + In 2.0.0 we have added a few new APIs on the ReadOnlyWindowStore interface (for details please read Streams API changes below). + If you have customized window store implementations that extends the ReadOnlyWindowStore interface you need to make code changes.

- If you want to upgrade from 0.10.1.x to 2.0.x see the Upgrade Sections for 0.10.2, - 0.11.0, - 1.0, - 1.1, and - 2.0. - Note, that a brokers on-disk message format must be on version 0.10 or higher to run a Kafka Streams application version 2.0 or higher. - See below a complete list of 0.10.2, 0.11.0, - 1.0, 1.1, and 2.0 - API and semantical changes that allow you to advance your application and/or simplify your code base, including the usage of new features. + We have also removed some public APIs that are deprecated prior to 1.0.x in 2.0.0. + See below for a detailed list of removed APIs.

-

- Upgrading from 0.10.0.x to 2.0.0 directly is also possible. - Note, that a brokers must be on version 0.10.1 or higher and on-disk message format must be on version 0.10 or higher - to run a Kafka Streams application version 2.0 or higher. - See Streams API changes in 0.10.1, Streams API changes in 0.10.2, - Streams API changes in 0.11.0, Streams API changes in 1.0, and - Streams API changes in 1.1, and Streams API changes in 2.0 - for a complete list of API changes. - Upgrading to 2.0.0 requires two rolling bounces with config upgrade.from="0.10.0" set for first upgrade phase - (cf. KIP-268). - As an alternative, an offline upgrade is also possible. + In addition, if you using Java 8 method references in your Kafka Streams code you might need to update your code to resolve method ambiguities. + Hot-swapping the jar-file only might not work for this case. + See below a complete list of 2.0.0 + API and semantic changes that allow you to advance your application and/or simplify your code base.

-
    -
  • prepare your application instances for a rolling bounce and make sure that config upgrade.from is set to "0.10.0" for new version 2.0.0
  • -
  • bounce each instance of your application once
  • -
  • prepare your newly deployed 2.0.0 application instances for a second round of rolling bounces; make sure to remove the value for config upgrade.mode
  • -
  • bounce each instance of your application once more to complete the upgrade
  • -
-

Upgrading from 0.10.0.x to 2.0.0 in offline mode:

-
    -
  • stop all old (0.10.0.x) application instances
  • -
  • update your code and swap old code and jar file with new code and new jar file
  • -
  • restart all new (2.0.0) application instances
  • -

Streams API changes in 2.0.0

@@ -169,6 +145,26 @@ Kafka Streams DSL for Scala documentation and KIP-270.

+

+ We have removed these deprecated APIs: +

+
    +
  • KafkaStreams#toString no longer returns the topology and runtime metadata; to get topology metadata users can call Topology#describe() and to get thread runtime metadata users can call KafkaStreams#localThreadsMetadata (they are deprecated since 1.0.0). + For detailed guidance on how to update your code please read here
  • +
  • TopologyBuilder and KStreamBuilder are removed and replaced by Topology and StreamsBuidler respectively (they are deprecated since 1.0.0). + For detailed guidance on how to update your code please read here
  • +
  • StateStoreSupplier are removed and replaced with StoreBuilder (they are deprecated since 1.0.0); + and the corresponding Stores#create and KStream, KTable, KGroupedStream overloaded functions that use it have also been removed. + For detailed guidance on how to update your code please read here
  • +
  • KStream, KTable, KGroupedStream overloaded functions that requires serde and other specifications explicitly are removed and replaced with simpler overloaded functions that use Consumed, Produced, Serialized, Materialized, Joined (they are deprecated since 1.0.0). + For detailed guidance on how to update your code please read here
  • +
  • Processor#punctuate, ValueTransformer#punctuate, ValueTransformer#punctuate and RecordContext#schedule(long) are removed and replaced by RecordContext#schedule(long, PunctuationType, Punctuator) (they are deprecated in 1.0.0).
  • +
  • The second boolean typed parameter "loggingEnabled" in ProcessorContext#register has been removed; users can now use StoreBuilder#withLoggingEnabled, withLoggingDisabled to specify the behavior when they create the state store.
  • +
  • KTable#writeAs, print, foreach, to, through are removed, users can call KTable#tostream()#writeAs instead for the same purpose (they are deprecated since 0.11.0.0). + For detailed list of removed APIs please read here
  • +
  • StreamsConfig#KEY_SERDE_CLASS_CONFIG, VALUE_SERDE_CLASS_CONFIG, TIMESTAMP_EXTRACTOR_CLASS_CONFIG are removed and replaced with StreamsConfig#DEFAULT_KEY_SERDE_CLASS_CONFIG, DEFAULT_VALUE_SERDE_CLASS_CONFIG, DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG respectively (they are deprecated since 0.11.0.0).
  • +
  • StreamsConfig#ZOOKEEPER_CONNECT_CONFIG are removed as we do not need ZooKeeper dependency in Streams any more (it is deprecated since 0.10.2.0).
  • +

Streams API changes in 1.1.0

diff --git a/docs/upgrade.html b/docs/upgrade.html index f15191d..00f7ffe 100644 --- a/docs/upgrade.html +++ b/docs/upgrade.html @@ -19,7 +19,7 @@