From 529263a0b39094b14dea316f24349ed51031f483 Mon Sep 17 00:00:00 2001 From: Juan Rodriguez Hortala Date: Sun, 3 Apr 2016 23:36:55 -0700 Subject: [PATCH 1/3] update credit to spark-testing-base --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ead0696..a54a51d 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,4 @@ Use linear temporal logic to write ScalaCheck properties for Spark Streaming pro This work has been partially supported by MICINN Spanish project StrongSoft (TIN2012-39391-C04-04), by the Spanish MINECO project CAVI-ART (TIN2013-44742-C4-3-R), and by the Comunidad de Madrid project [N-Greens Software-CM](http://n-greens-cm.org/) (S2013/ICE-2731). -Some parts of this code are based on [Spark Testing Base](https://github.com/holdenk/spark-testing-base) by Holden Karau +Some parts of this code are based on or have been taken from [Spark Testing Base](https://github.com/holdenk/spark-testing-base) by Holden Karau From a1099707347809a3e1ed336bd02a32e106f5ed42 Mon Sep 17 00:00:00 2001 From: Juan Pedro Moreno Date: Fri, 6 May 2016 11:39:13 +0200 Subject: [PATCH 2/3] Provides cross scala version compatibility, 2.10 and 2.11 --- .travis.yml | 3 ++- build.sbt | 19 +++++++------------ .../sscheck/prop/tl/DStreamTLProperty.scala | 5 ++--- .../sscheck/spark/SharedSparkContext.scala | 3 +-- .../streaming/SharedStreamingContext.scala | 3 +-- ...dStreamingContextBeforeAfterEachTest.scala | 3 +-- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97ec5dd..3f6cfa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: scala scala: - - 2.10.5 + - 2.10.6 + - 2.11.8 jdk: - oraclejdk7 script: diff --git a/build.sbt b/build.sbt index 6b04848..a372828 100644 --- a/build.sbt +++ b/build.sbt @@ -1,24 +1,22 @@ -import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys._ - name := "sscheck" organization := "es.ucm.fdi" -version := "0.2.3" // "0.2.3-SNAPSHOT" // +version := "0.2.3" // "0.2.3-SNAPSHOT" // -scalaVersion := "2.10.6" +scalaVersion := "2.11.8" -crossScalaVersions := Seq("2.10.6") +crossScalaVersions := Seq("2.10.6", "2.11.8") licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")) bintrayPackageLabels := Seq("testing") -bintrayVcsUrl := Some("git@github.com:juanrh/sscheck.git") +bintrayVcsUrl := Some("git@github.com:juanrh/sscheck.git") lazy val sparkVersion = "1.6.1" -lazy val specs2Version = "3.6.4" +lazy val specs2Version = "3.6.4" // Use `sbt doc` to generate scaladoc, more on chapter 14.8 of "Scala Cookbook" @@ -37,7 +35,7 @@ parallelExecution := false // This is critical so log4j.properties is found by eclipse EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource -// Spark +// Spark libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion libraryDependencies += "org.apache.spark" %% "spark-streaming" % sparkVersion @@ -55,10 +53,7 @@ libraryDependencies += "org.specs2" %% "specs2-matcher-extra" % specs2Version libraryDependencies += "org.specs2" %% "specs2-junit" % specs2Version -// note this is discontinued for scala 2.11, which uses https://github.com/typesafehub/scala-logging#contribution-policy -libraryDependencies += "com.typesafe" % "scalalogging-log4j_2.10" % "1.1.0" - -libraryDependencies += "com.typesafe" %% "scalalogging-slf4j" % "1.1.0" +libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.21" resolvers ++= Seq( "MVN Repository.com" at "http://mvnrepository.com/artifact/", diff --git a/src/main/scala/es/ucm/fdi/sscheck/prop/tl/DStreamTLProperty.scala b/src/main/scala/es/ucm/fdi/sscheck/prop/tl/DStreamTLProperty.scala index d8f1155..ffc5a74 100644 --- a/src/main/scala/es/ucm/fdi/sscheck/prop/tl/DStreamTLProperty.scala +++ b/src/main/scala/es/ucm/fdi/sscheck/prop/tl/DStreamTLProperty.scala @@ -13,7 +13,6 @@ import scala.reflect.ClassTag import scala.concurrent.SyncVar import scala.util.{Try, Success, Failure} -import com.typesafe.scalalogging.slf4j.Logger import org.slf4j.LoggerFactory import scala.util.Properties.lineSeparator @@ -24,7 +23,7 @@ import es.ucm.fdi.sscheck.spark.streaming import es.ucm.fdi.sscheck.spark.streaming.TestInputStream object DStreamTLProperty { - @transient private val logger = Logger(LoggerFactory.getLogger("DStreamTLProperty")) + @transient private val logger = LoggerFactory.getLogger("DStreamTLProperty") } trait DStreamTLProperty @@ -146,7 +145,7 @@ case class TestCaseTimeoutException(msg : String) extends PropExecutionException(msg) object TestCaseContext { - @transient private val logger = Logger(LoggerFactory.getLogger("TestCaseContext")) + @transient private val logger = LoggerFactory.getLogger("TestCaseContext") // Constants used for printing a sample of the generated values for each batch val msgHeader = "-"*43 diff --git a/src/main/scala/es/ucm/fdi/sscheck/spark/SharedSparkContext.scala b/src/main/scala/es/ucm/fdi/sscheck/spark/SharedSparkContext.scala index 725caa3..b6b6945 100644 --- a/src/main/scala/es/ucm/fdi/sscheck/spark/SharedSparkContext.scala +++ b/src/main/scala/es/ucm/fdi/sscheck/spark/SharedSparkContext.scala @@ -2,7 +2,6 @@ package es.ucm.fdi.sscheck.spark import org.apache.spark._ -import com.typesafe.scalalogging.slf4j.Logger import org.slf4j.LoggerFactory /** This trait can be used to share a Spark Context. The context is created @@ -14,7 +13,7 @@ trait SharedSparkContext // cannot use private[this] due to https://issues.scala-lang.org/browse/SI-8087 //@transient private[this] val logger = Logger(LoggerFactory.getLogger("SharedSparkContext")) - @transient private val logger = Logger(LoggerFactory.getLogger("SharedSparkContext")) + @transient private val logger = LoggerFactory.getLogger("SharedSparkContext") /** Override for custom config * */ diff --git a/src/main/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContext.scala b/src/main/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContext.scala index a777093..96c470b 100644 --- a/src/main/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContext.scala +++ b/src/main/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContext.scala @@ -2,7 +2,6 @@ package es.ucm.fdi.sscheck.spark.streaming import org.apache.spark.streaming.{StreamingContext,Duration} -import com.typesafe.scalalogging.slf4j.Logger import org.slf4j.LoggerFactory import scala.util.Try @@ -14,7 +13,7 @@ trait SharedStreamingContext // cannot use private[this] due to https://issues.scala-lang.org/browse/SI-8087 // @transient private[this] val logger = Logger(LoggerFactory.getLogger("SharedStreamingContext")) - @transient private val logger = Logger(LoggerFactory.getLogger("SharedStreamingContext")) + @transient private val logger = LoggerFactory.getLogger("SharedStreamingContext") /** Override for custom config * */ diff --git a/src/test/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContextBeforeAfterEachTest.scala b/src/test/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContextBeforeAfterEachTest.scala index 6350d0d..d14edf0 100644 --- a/src/test/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContextBeforeAfterEachTest.scala +++ b/src/test/scala/es/ucm/fdi/sscheck/spark/streaming/SharedStreamingContextBeforeAfterEachTest.scala @@ -10,7 +10,6 @@ import org.apache.spark.rdd.RDD import scala.collection.mutable.Queue import scala.concurrent.duration._ -import com.typesafe.scalalogging.slf4j.Logger import org.slf4j.LoggerFactory import es.ucm.fdi.sscheck.matcher.specs2.RDDMatchers._ @@ -25,7 +24,7 @@ class SharedStreamingContextBeforeAfterEachTest with SharedStreamingContextBeforeAfterEach { // cannot use private[this] due to https://issues.scala-lang.org/browse/SI-8087 - @transient private val logger = Logger(LoggerFactory.getLogger("SharedStreamingContextBeforeAfterEachTest")) + @transient private val logger = LoggerFactory.getLogger("SharedStreamingContextBeforeAfterEachTest") // Spark configuration override def sparkMaster : String = "local[5]" From 279151dc627eb77a2531784275ba8eac6e225131 Mon Sep 17 00:00:00 2001 From: Juan Rodriguez Hortala Date: Sat, 14 May 2016 18:18:12 -0700 Subject: [PATCH 3/3] publish new version with cross scala compatibility for Scala 2.10 and 2.11 --- README.md | 12 +++++++++++- RELEASE_NOTES.md | 3 +++ build.sbt | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a54a51d..7a0c378 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,17 @@ Utilities for using ScalaCheck with Spark and Spark Streaming, based on Specs2 [Jenkins](https://juanrhcubox.duckdns.org:8080/) -Use linear temporal logic to write ScalaCheck properties for Spark Streaming programs, see the [**Quickstart**](https://github.com/juanrh/sscheck/wiki/Quickstart) for details. +Use linear temporal logic to write ScalaCheck properties for Spark Streaming programs, see the [**Quickstart**](https://github.com/juanrh/sscheck/wiki/Quickstart) for details. See also + + * [**scaladoc**](http://juanrh.github.io/doc/sscheck/api) + * sbt dependency + +```scala +lazy val sscheckVersion = "0.2.4" +libraryDependencies += "es.ucm.fdi" %% "sscheck" % sscheckVersion +resolvers += Resolver.bintrayRepo("juanrh", "maven") +``` +See latest version in [bintray](https://bintray.com/juanrh/maven/sscheck/view) # Acknowledgements This work has been partially supported by MICINN Spanish project StrongSoft (TIN2012-39391-C04-04), by the diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bd89538..6741c3b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +# sscheck 0.2.4 +Added cross Scala version compatibility, 2.10 and 2.11, see [#42](https://github.com/juanrh/sscheck/pull/42) + # sscheck 0.2.3 Bug fixing and code cleanup * Remove dependency to spark-testing-base and multisets in order to fix [#36](https://github.com/juanrh/sscheck/issues/36) diff --git a/build.sbt b/build.sbt index a372828..31f9767 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ name := "sscheck" organization := "es.ucm.fdi" -version := "0.2.3" // "0.2.3-SNAPSHOT" // +version := "0.2.4" // "0.2.4-SNAPSHOT" // scalaVersion := "2.11.8"