Browse Source

KAFKA-6390: Update ZooKeeper to 3.4.11, Gradle and other minor updates (#4345)

Updates:
- Gradle, gradle plugins and maven artifact updated
- Bug fix updates for ZooKeeper, Jackson, EasyMock and Snappy

Not updated:
- RocksDB as it often causes issues, so better done separately
- args4j as our test coverage is weak and the update was a
feature release

Also fixed scala-reflect version to match scala-library.

Release notes for ZooKeeper 3.4.11:
https://zookeeper.apache.org/doc/r3.4.11/releasenotes.html

A notable fix is improved handling of UnknownHostException:
https://issues.apache.org/jira/browse/ZOOKEEPER-2614

Manually tested that IntelliJ import and build still works.
Relying on existing test suite otherwise.

Reviewers: Jun Rao <junrao@gmail.com>
pull/4338/merge
Ismael Juma 7 years ago committed by GitHub
parent
commit
2652565d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      build.gradle
  2. 6
      core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala
  3. 2
      core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala
  4. 14
      gradle/dependencies.gradle

12
build.gradle

@ -25,10 +25,10 @@ buildscript { @@ -25,10 +25,10 @@ buildscript {
dependencies {
// For Apache Rat plugin to ignore non-Git files
classpath "org.ajoberstar:grgit:1.9.3"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'org.scoverage:gradle-scoverage:2.1.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'org.owasp:dependency-check-gradle:3.0.1'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
classpath 'org.owasp:dependency-check-gradle:3.0.2'
}
}
@ -79,7 +79,7 @@ allprojects { @@ -79,7 +79,7 @@ allprojects {
}
ext {
gradleVersion = "4.2.1"
gradleVersion = "4.4.1"
buildVersionFileName = "kafka-version.properties"
maxPermSizeArgs = []
@ -548,7 +548,9 @@ project(':core') { @@ -548,7 +548,9 @@ project(':core') {
compile libs.jacksonDatabind
compile libs.joptSimple
compile libs.metrics
compile libs.scala
compile libs.scalaLibrary
// only needed transitively, but set it explicitly to ensure it has the same version as scala-library
compile libs.scalaReflect
compile libs.scalaLogging
compile libs.slf4jApi
compile(libs.zkclient) {

6
core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala

@ -23,13 +23,11 @@ import kafka.utils.TestUtils._ @@ -23,13 +23,11 @@ import kafka.utils.TestUtils._
import kafka.api.FetchRequestBuilder
import kafka.message.ByteBufferMessageSet
import java.io.File
import java.net.UnknownHostException
import kafka.log.LogManager
import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord}
import org.apache.kafka.common.errors.KafkaStorageException
import org.apache.kafka.common.serialization.{IntegerSerializer, StringSerializer}
import org.I0Itec.zkclient.exception.ZkException
import org.junit.{Before, Test}
import org.junit.Assert._
@ -130,9 +128,9 @@ class ServerShutdownTest extends ZooKeeperTestHarness { @@ -130,9 +128,9 @@ class ServerShutdownTest extends ZooKeeperTestHarness {
@Test
def testCleanShutdownAfterFailedStartup() {
val newProps = TestUtils.createBrokerConfig(0, zkConnect)
newProps.setProperty("zookeeper.connect", "fakehostthatwontresolve:65535")
newProps.setProperty("zookeeper.connect", "some.invalid.hostname.foo.bar.local:65535")
val newConfig = KafkaConfig.fromProps(newProps)
verifyCleanShutdownAfterFailedStartup[UnknownHostException](newConfig)
verifyCleanShutdownAfterFailedStartup[IllegalArgumentException](newConfig)
}
@Test

2
core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala

@ -53,7 +53,7 @@ class ZooKeeperClientTest extends ZooKeeperTestHarness { @@ -53,7 +53,7 @@ class ZooKeeperClientTest extends ZooKeeperTestHarness {
Configuration.setConfiguration(null)
}
@Test(expected = classOf[UnknownHostException])
@Test(expected = classOf[IllegalArgumentException])
def testUnresolvableConnectString(): Unit = {
new ZooKeeperClient("some.invalid.hostname.foo.bar.local", -1, -1, Int.MaxValue, time)
}

14
gradle/dependencies.gradle

@ -51,8 +51,8 @@ versions += [ @@ -51,8 +51,8 @@ versions += [
apacheds: "2.0.0-M24",
argparse4j: "0.7.0",
bcpkix: "1.58",
easymock: "3.5",
jackson: "2.9.1",
easymock: "3.5.1",
jackson: "2.9.3",
jetty: "9.2.22.v20170606",
jersey: "2.25.1",
jmh: "1.19",
@ -69,11 +69,11 @@ versions += [ @@ -69,11 +69,11 @@ versions += [
scalatest: "3.0.4",
scoverage: "1.3.1",
slf4j: "1.7.25",
snappy: "1.1.4",
snappy: "1.1.7.1",
zkclient: "0.10",
zookeeper: "3.4.10",
zookeeper: "3.4.11",
jfreechart: "1.0.0",
mavenArtifact: "3.5.0"
mavenArtifact: "3.5.2"
]
libs += [
@ -108,8 +108,8 @@ libs += [ @@ -108,8 +108,8 @@ libs += [
powermockEasymock: "org.powermock:powermock-api-easymock:$versions.powermock",
reflections: "org.reflections:reflections:$versions.reflections",
rocksDBJni: "org.rocksdb:rocksdbjni:$versions.rocksDB",
scala: "org.scala-lang:scala-library:$versions.scala",
scalaCompiler: "org.scala-lang:scala-compiler:$versions.scala",
scalaLibrary: "org.scala-lang:scala-library:$versions.scala",
scalaReflect: "org.scala-lang:scala-reflect:$versions.scala",
scalatest: "org.scalatest:scalatest_$versions.baseScala:$versions.scalatest",
scoveragePlugin: "org.scoverage:scalac-scoverage-plugin_$versions.baseScala:$versions.scoverage",
scoverageRuntime: "org.scoverage:scalac-scoverage-runtime_$versions.baseScala:$versions.scoverage",

Loading…
Cancel
Save