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
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) = {
}
javacOptions in compile ++= Seq("-source", "1.7", "-target", "1.7"),
javacOptions in compile ++= Seq("-source", "1.7", "-target", "11"),
// resolve-term-conflict:object since storm-core has a package and object with the same name
scalacOptions := Seq("-feature", "-deprecation", "-Yresolve-term-conflict:object"),
@@ -220,7 +220,7 @@ lazy val commonSettings = Seq(
lazy val root = project.in(file("."))
.settings(commonSettings: _*)
.settings(publishArtifact := false)
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
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(
"com.metamx" % "java-util" % "1.3.6" exclude("log4j", "log4j") force(), "io.netty" % "netty" % "3.10.5.Final" force(), "org.apache.curator" % "curator-client" % curatorVersion force(), "org.apache.curator" % "curator-framework" % curatorVersion force(), @@ -139,7 +139,7 @@ val kafkaDependencies = Seq( ) ++ loggingDependencies
val coreTestDependencies = Seq(
"org.scalatest" %% "scalatest" % "3.0.8" % "test", dependOnDruid("druid-services") % "test", "org.apache.curator" % "curator-test" % curatorVersion % "test" exclude("log4j", "log4j") force(), "com.sun.jersey" % "jersey-servlet" % "1.17.1" % "test" force(), @@ -184,7 +184,7 @@ lazy val commonSettings = Seq(
// Target Java 7 scalacOptions += "-target:jvm-1.7",
javacOptions in compile ++= Seq("-source", "1.7", "-target", "11"),
// resolve-term-conflict:object since storm-core has a package and object with the same name scalacOptions := Seq("-feature", "-deprecation", "-Yresolve-term-conflict:object"), @@ -220,7 +220,7 @@ lazy val commonSettings = Seq( lazy val root = project.in(file(".")) .settings(commonSettings: _*) .settings(publishArtifact := false)
.aggregate(core)
lazy val core = project.in(file("core")) .settings(commonSettings: _*) @@ -228,52 +228,52 @@ lazy val core = project.in(file("core")) .settings(publishArtifact in(Test, packageBin) := true) .settings(libraryDependencies ++= (coreDependencies ++ coreTestDependencies))
-lazy val flink = project.in(file("flink"))
-lazy val spark = project.in(file("spark"))
-lazy val storm = project.in(file("storm"))
-lazy val samza = project.in(file("samza"))
-lazy val server = project.in(file("server"))
-lazy val kafka = project.in(file("kafka"))
-lazy val distribution = project.in(file("distribution"))
-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