Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonm1 committed Sep 1, 2019
2 parents 2fb0357 + 363c29e commit 58fc282
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Change Log

# 2.0.1

- update to [Spark 2.4.4](https://spark.apache.org/releases/spark-release-2-4-4.html).
- update to Scala `2.12.9`

# 2.0.0

Arc 2.0.0 is a major (breaking) change which has been done for multiple reasons:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Dependencies._

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.8"
lazy val scala212 = "2.12.9"
lazy val supportedScalaVersions = List(scala211, scala212)

lazy val root = (project in file(".")).
Expand Down
6 changes: 3 additions & 3 deletions docs-src/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ pygmentsUseClasses=true
repo_url = "https://github.com/tripl-ai/arc"

image = "triplai/arc"
version = "2.0.1"
arc_jupyter_image= "triplai/arc-jupyter"

version = "2.0.0"
spark_version = "2.4.3"
arc_jupyter_version = "1.3.1"
spark_version = "2.4.4"
scala_version = "2.11"
hadoop_version = "2.9.2"
arc_image_version = "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbt._

object Dependencies {
// versions
lazy val sparkVersion = "2.4.3"
lazy val sparkVersion = "2.4.4"
lazy val hadoopVersion = "2.9.2"

// arc
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/ai/tripl/arc/config/ArcPipeline.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ object ArcPipeline {
val lifecyclePluginsOrErrors = resolveConfigPlugins(resolvedConfig, "plugins.lifecycle", arcContext.lifecyclePlugins)(spark, logger, arcContext)
val pipelinePluginsOrErrors = resolveConfigPlugins(resolvedConfig, "stages", arcContext.pipelineStagePlugins)(spark, logger, arcContext)


(lifecyclePluginsOrErrors, pipelinePluginsOrErrors) match {
case (Left(lifecycleErrors), Left(pipelineErrors)) => Left(lifecycleErrors.reverse ::: pipelineErrors.reverse)
case (Right(_), Left(pipelineErrors)) => Left(pipelineErrors.reverse)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ai/tripl/arc/config/Plugins.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object Plugins {

// skip stage if not in environment
if (!arcContext.ignoreEnvironments && !environments.contains(arcContext.environment.get)) {
logger.trace()
logger.info()
.field("event", "validateConfig")
.field("type", pluginType.right.getOrElse("unknown"))
.field("stageIndex", index)
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/ai/tripl/arc/extract/AvroExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class AvroExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
stage.stageDetail.put("input", input)
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
for (inputField <- inputField) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/ai/tripl/arc/extract/BytesExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class BytesExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("failMode", stage.failMode.sparkString)
stage.stageDetail.put("input", if (c.hasPath("inputView")) inputView else parsedGlob)
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(stage.persist))
stage.stageDetail.put("params", params.asJava)
Expand Down
7 changes: 3 additions & 4 deletions src/main/scala/ai/tripl/arc/extract/DelimitedExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@ class DelimitedExtract extends PipelineStagePlugin {
case Some(basePath) => Delimited.toSparkOptions(stage.settings) + ("basePath" -> basePath)
case None => Delimited.toSparkOptions(stage.settings)
}
val inputValue = stage.input match {
case Left(view) => view
case Right(glob) => glob
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("input", inputValue)
stage.stageDetail.put("options", options.asJava)
for (inputField <- inputField) {
stage.stageDetail.put("inputField", inputField)
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/ai/tripl/arc/extract/HTTPExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class HTTPExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("headers", HTTPUtils.maskHeaders("Authorization" :: Nil)(stage.headers).asJava)
stage.stageDetail.put("input", if(c.hasPath("inputView")) inputView else parsedURI)
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("method", method)
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ai/tripl/arc/extract/ImageExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ImageExtract extends PipelineStagePlugin {
stage.stageDetail.put("basePath", basePath)
}
stage.stageDetail.put("dropInvalid", java.lang.Boolean.valueOf(dropInvalid))
stage.stageDetail.put("input", parsedGlob)
stage.stageDetail.put("inputURI", parsedGlob)
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
stage.stageDetail.put("params", params.asJava)
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/ai/tripl/arc/extract/JSONExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ class JSONExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
stage.stageDetail.put("input", input)
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
stage.stageDetail.put("options", JSON.toSparkOptions(stage.settings).asJava)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ai/tripl/arc/extract/ORCExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ORCExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
stage.stageDetail.put("input", parsedGlob)
stage.stageDetail.put("inputURI", parsedGlob)
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
for (basePath <- basePath) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ai/tripl/arc/extract/ParquetExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ParquetExtract extends PipelineStagePlugin {
contiguousIndex=contiguousIndex
)

stage.stageDetail.put("input", parsedGlob)
stage.stageDetail.put("inputURI", parsedGlob)
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/ai/tripl/arc/extract/TextExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TextExtract extends PipelineStagePlugin {
)

stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
stage.stageDetail.put("input", parsedGlob)
stage.stageDetail.put("inputURI", parsedGlob)
stage.stageDetail.put("multiLine", java.lang.Boolean.valueOf(multiLine))
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/ai/tripl/arc/extract/XMLExtract.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ class XMLExtract extends PipelineStagePlugin {
contiguousIndex=contiguousIndex
)

stage.stageDetail.put("input", input)
input match {
case Left(inputView) => stage.stageDetail.put("inputView", inputView)
case Right(parsedGlob) =>stage.stageDetail.put("inputURI", parsedGlob)
}
stage.stageDetail.put("outputView", outputView)
stage.stageDetail.put("persist", java.lang.Boolean.valueOf(persist))
stage.stageDetail.put("contiguousIndex", java.lang.Boolean.valueOf(contiguousIndex))
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version := "2.0.0"
version := "2.0.1"

0 comments on commit 58fc282

Please sign in to comment.