Skip to content

Commit 542eadd

Browse files
author
Jaroslaw Osmanski
committed
Remove pyspark (use one in SPARK_HOME)
1 parent a0c3dab commit 542eadd

File tree

438 files changed

+4
-251236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+4
-251236
lines changed

seahorse-workflow-executor/workflowexecutor/src/main/scala/ai/deepsense/workflowexecutor/WorkflowExecutorApp.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ object WorkflowExecutorApp extends Logging {
243243
).execute()
244244
} else {
245245
// Running in non-interactive mode
246-
val pythonPathGenerator = new pyspark.Loader(None).load
246+
val pythonPathGenerator = pyspark.Loader.load
247247
.map(new PythonPathGenerator(_))
248248
.getOrElse(throw new RuntimeException("Could not find PySpark!"))
249249

seahorse-workflow-executor/workflowexecutor/src/main/scala/ai/deepsense/workflowexecutor/executor/SessionExecutor.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package ai.deepsense.workflowexecutor.executor
1818

19-
import java.io.File
2019
import java.net.{InetAddress, URL}
2120

2221
import scala.concurrent.duration._
@@ -102,7 +101,7 @@ case class SessionExecutor(
102101

103102
val tempPath = Unzip.unzipAll(depsZip)
104103

105-
val pythonPathGenerator = new pyspark.Loader(Some(tempPath)).load
104+
val pythonPathGenerator = pyspark.Loader.load
106105
.map(new PythonPathGenerator(_))
107106
.getOrElse(throw new RuntimeException("Could not find PySpark!"))
108107

seahorse-workflow-executor/workflowexecutor/src/main/scala/ai/deepsense/workflowexecutor/pyspark/Loader.scala

+2-10
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,9 @@ import scala.reflect.io.Path
2020

2121
import ai.deepsense.commons.utils.Logging
2222

23-
class Loader(
24-
private val localPath: Option[String] = None
25-
) extends Logging {
23+
object Loader extends Logging {
2624

27-
def load: Option[String] = {
28-
localPath match {
29-
case Some(x) => Some(x)
30-
case None =>
31-
Option(System.getenv("SPARK_HOME")).map(pysparkPath)
32-
}
33-
}
25+
def load: Option[String] = Option(System.getenv("SPARK_HOME")).map(pysparkPath)
3426

3527
private def pysparkPath(sparkHome: String): String = {
3628
val path = Path(sparkHome)./("python").toAbsolute.toString()

sessionmanager/we-deps-consts/2.0.0/pyspark/__init__.py

-109
This file was deleted.

0 commit comments

Comments
 (0)