-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
647 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
default_stages: | ||
- commit | ||
- push | ||
fail_fast: true | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: scalafmt-test | ||
name: Scalafmt Fixes | ||
pass_filenames: false | ||
language: system | ||
entry: scalafmt | ||
always_run: true | ||
- id: scalac-lint | ||
name: Scala lint | ||
language: system | ||
always_run: true | ||
pass_filenames: false | ||
verbose: true | ||
entry: sbt | ||
args: [ '; clean ; set scalacOptions ++= Seq("-Xfatal-warnings", "-Wconf:any:warning-verbose") ; compile' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version=2.7.5 | ||
align { | ||
preset = some | ||
} | ||
optIn.configStyleArguments = false | ||
maxColumn = 90 | ||
newlines { | ||
neverInResultType = false | ||
alwaysBeforeElseAfterCurlyIf = false | ||
topLevelStatements = [before,after] | ||
implicitParamListModifierPrefer = before | ||
avoidForSimpleOverflow = [tooLong] | ||
} | ||
danglingParentheses { | ||
defnSite = false | ||
callSite = false | ||
ctrlSite = false | ||
} | ||
align { | ||
openParenCallSite = false | ||
openParenDefnSite = true | ||
} | ||
docstrings { | ||
blankFirstLine = yes | ||
style = SpaceAsterisk | ||
} | ||
continuationIndent { | ||
extendSite = 2 | ||
withSiteRelativeToExtends = 2 | ||
ctorSite = 4 | ||
callSite = 2 | ||
defnSite = 4 | ||
} | ||
runner { | ||
optimizer { | ||
forceConfigStyleOnOffset = 45 | ||
forceConfigStyleMinArgCount = 5 | ||
} | ||
} | ||
verticalMultiline { | ||
newlineAfterOpenParen = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,15 @@ val dependencies = Seq( | |
"org.apache.spark" %% "spark-hive" % sparkVersion % Provided, | ||
"org.apache.spark" %% "spark-avro" % sparkVersion % Provided, | ||
"io.delta" %% "delta-core" % "0.7.0" % Provided, | ||
"com.typesafe" % "config" % "1.3.2" | ||
) | ||
"com.typesafe" % "config" % "1.3.2") | ||
|
||
val testDependencies = Seq( | ||
"org.scalatest" %% "scalatest" % "3.0.5" % Test, | ||
"org.scalamock" %% "scalamock" % "4.1.0" % Test, | ||
"com.holdenkarau" %% "spark-testing-base" % s"${sparkTestVersion}_0.14.0" % Test | ||
) | ||
"com.holdenkarau" %% "spark-testing-base" % s"${sparkTestVersion}_0.14.0" % Test) | ||
|
||
import xerial.sbt.Sonatype._ | ||
|
||
val settings = Seq( | ||
organization := "com.damavis", | ||
version := "0.3.10", | ||
|
@@ -29,30 +28,27 @@ val settings = Seq( | |
libraryDependencies ++= dependencies ++ testDependencies, | ||
fork in Test := true, | ||
parallelExecution in Test := false, | ||
envVars in Test := Map( | ||
"MASTER" -> "local[*]" | ||
), | ||
envVars in Test := Map("MASTER" -> "local[*]"), | ||
test in assembly := {}, | ||
// Sonatype | ||
sonatypeProfileName := "com.damavis", | ||
sonatypeProjectHosting := Some( | ||
GitHubHosting("damavis", "damavis-spark", "[email protected]")), | ||
publishMavenStyle := true, | ||
licenses := Seq( | ||
"APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
developers := List( | ||
Developer(id = "piffall", | ||
name = "Cristòfol Torrens", | ||
email = "[email protected]", | ||
url = url("http://piffall.com")), | ||
Developer(id = "priera", | ||
name = "Pedro Riera", | ||
email = "pedro.riera at damavis dot com", | ||
url = url("http://github.com/priera")), | ||
), | ||
Developer( | ||
id = "piffall", | ||
name = "Cristòfol Torrens", | ||
email = "[email protected]", | ||
url = url("http://piffall.com")), | ||
Developer( | ||
id = "priera", | ||
name = "Pedro Riera", | ||
email = "pedro.riera at damavis dot com", | ||
url = url("http://github.com/priera"))), | ||
publishTo := sonatypePublishToBundle.value, | ||
credentials += Publish.credentials | ||
) | ||
credentials += Publish.credentials) | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(name := "damavis-spark") | ||
|
@@ -63,25 +59,18 @@ lazy val root = (project in file(".")) | |
lazy val core = (project in file("damavis-spark-core")) | ||
.settings(settings) | ||
.settings(name := "damavis-spark-core") | ||
.settings( | ||
crossScalaVersions := supportedScalaVersions, | ||
) | ||
.settings(crossScalaVersions := supportedScalaVersions) | ||
|
||
lazy val azure = (project in file("damavis-spark-azure")) | ||
.settings(settings) | ||
.settings(name := "damavis-spark-azure") | ||
.settings( | ||
crossScalaVersions := supportedScalaVersions, | ||
) | ||
.settings(crossScalaVersions := supportedScalaVersions) | ||
.dependsOn(core) | ||
|
||
lazy val snowflake = (project in file("damavis-spark-snowflake")) | ||
.settings(settings) | ||
.settings(name := "damavis-spark-snowflake") | ||
.settings( | ||
crossScalaVersions := supportedScalaVersions, | ||
libraryDependencies ++= Seq( | ||
"net.snowflake" %% "spark-snowflake" % "2.8.2-spark_3.0" | ||
) | ||
) | ||
.dependsOn(core) | ||
libraryDependencies ++= Seq("net.snowflake" %% "spark-snowflake" % "2.8.2-spark_3.0")) | ||
.dependsOn(core) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,5 @@ object DbManager { | |
|
||
new Database(db, HadoopFS(), catalog) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...core/src/main/scala/com/damavis/spark/database/exceptions/DatabaseNotFoundException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.damavis.spark.database.exceptions | ||
|
||
class DatabaseNotFoundException(name: String) | ||
extends Exception(s"""Database "$name" not found in catalog""") {} | ||
extends Exception(s"""Database "$name" not found in catalog""") {} |
2 changes: 1 addition & 1 deletion
2
...e/src/main/scala/com/damavis/spark/database/exceptions/InvalidDatabaseNameException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.damavis.spark.database.exceptions | ||
|
||
class InvalidDatabaseNameException(name: String) | ||
extends Exception(s""""$name" is not a valid database name""") {} | ||
extends Exception(s""""$name" is not a valid database name""") {} |
3 changes: 1 addition & 2 deletions
3
...-core/src/main/scala/com/damavis/spark/database/exceptions/TableDefinitionException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
package com.damavis.spark.database.exceptions | ||
|
||
class TableDefinitionException(val table: String, msg: String) | ||
extends Exception(msg) {} | ||
class TableDefinitionException(val table: String, msg: String) extends Exception(msg) {} |
1 change: 1 addition & 0 deletions
1
damavis-spark-core/src/main/scala/com/damavis/spark/dataflow/DataFlow.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
damavis-spark-core/src/main/scala/com/damavis/spark/dataflow/DataFlowSource.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
damavis-spark-core/src/main/scala/com/damavis/spark/dataflow/SourceProcessor.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.