Skip to content

Commit

Permalink
Add cross compilation with scala 2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCanali committed Aug 10, 2022
1 parent 21af54c commit 3c952ee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scala_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
run: sbt +package
- uses: actions/upload-artifact@v2
with:
name: sparkMeasure package scala 2.11
path: /home/runner/work/sparkMeasure/sparkMeasure/target/scala-2.11/*.jar
name: sparkMeasure package scala 2.13
path: /home/runner/work/sparkMeasure/sparkMeasure/target/scala-2.13/*.jar
- uses: actions/upload-artifact@v2
with:
name: sparkMeasure package scala 2.12
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name := "spark-measure"
version := "0.20-SNAPSHOT"

scalaVersion := "2.12.15"
crossScalaVersions := Seq("2.12.15")
crossScalaVersions := Seq("2.12.15", "2.13.8")

licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))

Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/ch/cern/sparkmeasure/PushGateway.scala
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ case class PushGateway(serverIPnPort: String, metricsJob: String) {
if (responseCode != 202) // 202 Accepted, 400 Bad Request
logger.error(s"Data sent error, url: '$urlFull', response: $responseCode '$responseMessage'")
} catch {
case ioe: java.io.IOException =>
println("java.io.IOException")
logger.error(s"Data sent error, url: '$urlFull', " + ioe.getMessage())
case ste: java.net.SocketTimeoutException =>
println("java.net.SocketTimeoutException")
logger.error(s"Data sent error, url: '$urlFull', " + ste.getMessage())
case ioe: java.io.IOException =>
println("java.io.IOException")
logger.error(s"Data sent error, url: '$urlFull', " + ioe.getMessage())
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ch/cern/sparkmeasure/StageMetrics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ case class StageMetrics(sparkSession: SparkSession) {
// into a DataFrame and register it as a view for querying with SQL
def createStageMetricsDF(nameTempView: String = "PerfStageMetrics"): DataFrame = {
import sparkSession.implicits._
val resultDF = listenerStage.stageMetricsData.toDF
val resultDF = listenerStage.stageMetricsData.toSeq.toDF()
resultDF.createOrReplaceTempView(nameTempView)
logger.warn(s"Stage metrics data refreshed into temp view $nameTempView")
resultDF
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ch/cern/sparkmeasure/TaskMetrics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ case class TaskMetrics(sparkSession: SparkSession) {
// into a DataFrame and register it as a view for querying with SQL
def createTaskMetricsDF(nameTempView: String = "PerfTaskMetrics"): DataFrame = {
import sparkSession.implicits._
val resultDF = listenerTask.taskMetricsData.toDF
val resultDF = listenerTask.taskMetricsData.toSeq.toDF()
resultDF.createOrReplaceTempView(nameTempView)
logger.warn(s"Stage metrics data refreshed into temp view $nameTempView")
resultDF
Expand Down

0 comments on commit 3c952ee

Please sign in to comment.