druid-io / tranquility

Tranquility helps you send real-time event streams to Druid and handles partitioning, replication, service discovery, and schema rollover, seamlessly and without downtime.
Apache License 2.0
516 stars 230 forks source link

Not able to compile tranquility-core source code with jdk 11 & scala 2.12.1 & sbt 1.2.8 #302

Open Suryansh-Bhadouria-007 opened 5 years ago

Suryansh-Bhadouria-007 commented 5 years ago

After upgrading all plugins to newer versions and changing certain dependencies- diff- diff --git a/build.sbt b/build.sbt index f4151c0..940eae5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -scalaVersion in ThisBuild := "2.11.8" +scalaVersion in ThisBuild := "2.12.1"

// Disable parallel execution, the various Druid oriented tests need to claim ports parallelExecution in ThisBuild := false @@ -11,7 +11,7 @@ concurrentRestrictions in Global += Tags.limitAll(1) val jacksonOneVersion = "1.9.13" // See https://github.com/druid-io/druid/pull/1669, https://github.com/druid-io/tranquility/pull/81 before upgrading Jackson val jacksonTwoVersion = "2.4.6" -val jacksonTwoModuleScalaVersion = "2.4.5" +val jacksonTwoModuleScalaVersion = "2.9.9" val druidVersion = "0.9.2" val curatorVersion = "2.12.0" val guiceVersion = "4.0" @@ -45,11 +45,11 @@ def dependOnDruid(artifact: String) = { }

val coreDependencies = Seq(

-lazy val flink = project.in(file("flink"))

-addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") +addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")

-addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.4") +addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")

-addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0-M1")

-addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.5") +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.22")

logs- [info] Loading settings for project tranquility-build from plugins.sbt ... [info] Loading project definition from /home/suryansh/workspace/sonar-test/tranquility/project [info] Loading settings for project root from build.sbt,version.sbt ... [info] Set current project to root (in build file:/home/suryansh/workspace/sonar-test/tranquility/) [info] Setting Scala version to 2.12.1 on 2 projects. [info] Reapplying settings... [info] Set current project to root (in build file:/home/suryansh/workspace/sonar-test/tranquility/) [info] Compiling 54 Scala sources to /home/suryansh/workspace/sonar-test/tranquility/core/target/scala-2.12/classes ... [warn] /home/suryansh/workspace/sonar-test/tranquility/core/src/main/scala/com/metamx/tranquility/druid/DruidBeams.scala:166:39: non-variable type argument java.nio.ByteBuffer in type io.druid.data.input.impl.InputRowParser[java.nio.ByteBuffer] is unchecked since it is eliminated by erasure [warn] trialParser.isInstanceOf[InputRowParser[ByteBuffer]], [warn] ^ [warn] /home/suryansh/workspace/sonar-test/tranquility/core/src/main/scala/com/metamx/tranquility/druid/DruidBeams.scala:175:39: non-variable type argument java.nio.ByteBuffer in type io.druid.data.input.impl.InputRowParser[java.nio.ByteBuffer] is unchecked since it is eliminated by erasure [warn] trialParser.isInstanceOf[InputRowParser[ByteBuffer]], [warn] ^ [error] /home/suryansh/workspace/sonar-test/tranquility/core/src/main/scala/com/metamx/tranquility/druid/DruidGuicer.scala:71:20: ambiguous reference to overloaded definition, [error] both method putAll in class Properties of type (x$1: java.util.Map[, ])Unit [error] and method putAll in class Hashtable of type (x$1: java.util.Map[ <: Object, <: Object])Unit [error] match argument types (java.util.Properties) [error] theProps.putAll(props) [error] ^ [error] /home/suryansh/workspace/sonar-test/tranquility/core/src/main/scala/com/metamx/tranquility/druid/DruidGuicer.scala:72:20: ambiguous reference to overloaded definition, [error] both method putAll in class Properties of type (x$1: java.util.Map[, ])Unit [error] and method putAll in class Hashtable of type (x$1: java.util.Map[ <: Object, <: Object])Unit [error] match argument types (java.util.Properties) [error] theProps.putAll(System.getProperties) [error] ^ [warn] two warnings found [error] two errors found [error] (core / Compile / compileIncremental) Compilation failed [error] Total time: 13 s, completed 20-Jun-2019, 4:19:29 PM

Suryansh-Bhadouria-007 commented 5 years ago

Please help with the issue quoted above.