Child pages
  • KIP-119: Drop Support for Scala 2.10 in Kafka 0.11
Skip to end of metadata
Go to start of metadata

Status

Current stateAdopted

Discussion threadhttp://search-hadoop.com/m/uyzND1x9nfFvpCne2

JIRA: KAFKA-4422 - Drop support for Scala 2.10 (KIP-119) Resolved

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

We currently build Kafka for 3 Scala versions: 2.10, 2.11 and the recently released 2.12 (not yet enabled in the "All" targets as it requires Java 8, but we have a Jenkins build for this version during PR validation). Since we have to compile and run the tests on each supported version, there is a non-trivial cost from a development and testing perspective

Scala 2.10 was released in March 2013 (support ended in March 2015, almost 2 years ago), 2.11 was released in April 2014 and 2.12 was released in November 2016. A reasonable policy is to support the 2 most recently released versions so that we can strike a good balance between supporting older versions, maintainability and taking advantage of language and library improvements. Furthermore, since the recommended clients (producer and consumer) are now pure Java, this should mostly affect the broker and tools where support for older Scala versions matters less.

In our downloads page, we have recommended the Kafka binaries built with Scala 2.11 since Kafka 0.9.0.0.

Moving to 2.11 as the minimum requirement would allow us to benefit from faster Map implementations like LongMap and AnyRefMap, improved compiler warnings for potential bugs, faster compilation and the ability to use libraries that are only available for Scala 2.11 and above (an example is scala-logging, which improves upon our Logging trait by not creating closures or affecting stacktraces/log line information). See the announcement for the full list of improvements.

Public Interfaces

None.

Proposed Changes

Update build.gradle to remove all tasks for Scala 2.10, update gradle.properties to set the default Scala version to 2.11.x, remove code in dependencies.gradle that is conditional on Scala 2.10 and update the default version in kafka-run-class.sh and kafka-run-class.bat.

Compatibility, Deprecation, and Migration Plan

Users who have not and cannot upgrade to Scala 2.11/2.12 and are still using the old clients would have to continue to use Kafka 0.10.x until they can upgrade to one of the more recent Scala version or update their code to use the Java clients (which is recommended anyway).

Rejected Alternatives

  1. Support 3 Scala versions in the next major release, 2.10, 2.11 and 2.12: the cost seems to outweigh the benefits.
  • No labels