Skip to content

Commit

Permalink
Initial base
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <andy.kwok@improving.com>
  • Loading branch information
andy-k-improving committed Dec 11, 2024
1 parent 896fda2 commit 1ea1b89
Show file tree
Hide file tree
Showing 68 changed files with 1,502 additions and 3,205 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/snapshot-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
distribution: 'temurin'
java-version: 11

- name: Set up SBT
uses: sbt/setup-sbt@v1

- name: Publish to Local Maven
run: |
sbt standaloneCosmetic/publishM2
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
distribution: 'temurin'
java-version: 11

- name: Set up SBT
uses: sbt/setup-sbt@v1

- name: Style check
run: sbt scalafmtCheckAll

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ bin/spark-shell --packages "org.opensearch:opensearch-spark-standalone_2.12:0.7.
To build and run this PPL in Spark, you can run (requires Java 11):

```
sbt clean sparkPPLCosmetic/publishM2
```

Then add org.opensearch:opensearch-spark-ppl_2.12 when run spark application, for example,
Expand Down
31 changes: 7 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import Dependencies.*
import Dependencies._
import sbtassembly.AssemblyPlugin.autoImport.ShadeRule

lazy val scala212 = "2.12.14"
lazy val sparkVersion = "3.5.1"
Expand Down Expand Up @@ -37,11 +38,6 @@ ThisBuild / scalastyleConfig := baseDirectory.value / "scalastyle-config.xml"
*/
ThisBuild / Test / parallelExecution := false

/**
* Set the parallelism of forked tests to 4 to accelerate integration test
*/
concurrentRestrictions in Global := Seq(Tags.limit(Tags.ForkedTestGroup, 4))

// Run as part of compile task.
lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")

Expand Down Expand Up @@ -194,6 +190,9 @@ lazy val pplSparkIntegration = (project in file("ppl-spark-integration"))
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
"org.projectlombok" % "lombok" % "1.18.30",
"com.github.seancfoley" % "ipaddress" % "5.5.1",
"org.apache.commons" % "commons-lang3" % "3.17.0",
"org.apache.commons" % "commons-csv" % "1.12.0",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.14.2",
),
libraryDependencies ++= deps(sparkVersion),
// ANTLR settings
Expand Down Expand Up @@ -278,29 +277,13 @@ lazy val integtest = (project in file("integ-test"))
IntegrationTest / javaSource := baseDirectory.value / "src/integration/java",
IntegrationTest / scalaSource := baseDirectory.value / "src/integration/scala",
IntegrationTest / resourceDirectory := baseDirectory.value / "src/integration/resources",
IntegrationTest / parallelExecution := true, // enable parallel execution
IntegrationTest / testForkedParallel := false, // disable forked parallel execution to avoid duplicate spark context in the same JVM
IntegrationTest / parallelExecution := false,
IntegrationTest / fork := true,
IntegrationTest / testGrouping := {
val tests = (IntegrationTest / definedTests).value
val forkOptions = ForkOptions()
val groups = tests.grouped(tests.size / 4 + 1).zipWithIndex.map { case (group, index) =>
val groupName = s"group-${index + 1}"
new Tests.Group(
name = groupName,
tests = group,
runPolicy = Tests.SubProcess(
forkOptions.withRunJVMOptions(forkOptions.runJVMOptions ++
Seq(s"-Djava.io.tmpdir=${baseDirectory.value}/integ-test/target/tmp/$groupName")))
)
}
groups.toSeq
}
)),
inConfig(AwsIntegrationTest)(Defaults.testSettings ++ Seq(
AwsIntegrationTest / javaSource := baseDirectory.value / "src/aws-integration/java",
AwsIntegrationTest / scalaSource := baseDirectory.value / "src/aws-integration/scala",
AwsIntegrationTest / parallelExecution := true,
AwsIntegrationTest / parallelExecution := false,
AwsIntegrationTest / fork := true,
)),
libraryDependencies ++= Seq(
Expand Down
4 changes: 0 additions & 4 deletions docker/apache-spark-sample/.env

This file was deleted.

41 changes: 0 additions & 41 deletions docker/apache-spark-sample/docker-compose.yml

This file was deleted.

29 changes: 0 additions & 29 deletions docker/apache-spark-sample/spark-defaults.conf

This file was deleted.

1 change: 0 additions & 1 deletion docker/spark-emr-sample/.env

This file was deleted.

17 changes: 0 additions & 17 deletions docker/spark-emr-sample/docker-compose.yml

This file was deleted.

3 changes: 0 additions & 3 deletions docker/spark-emr-sample/logging-conf/run-adot-collector.sh

This file was deleted.

3 changes: 0 additions & 3 deletions docker/spark-emr-sample/logging-conf/run-fluentd-spark.sh

This file was deleted.

25 changes: 0 additions & 25 deletions docker/spark-emr-sample/spark-conf/hive-site.xml

This file was deleted.

74 changes: 0 additions & 74 deletions docker/spark-emr-sample/spark-conf/log4j2.properties

This file was deleted.

Empty file.
65 changes: 0 additions & 65 deletions docker/spark-emr-sample/spark-conf/spark-defaults.conf

This file was deleted.

Loading

0 comments on commit 1ea1b89

Please sign in to comment.