Class

spark.jobserver.python

JobEndpoint

Related Doc: package python

Permalink

case class JobEndpoint[C <: PythonContextLike](context: C, sparkConf: SparkConf, contextConfig: Config, jobId: String, jobConfig: Config, jobClass: String, py4JImports: Seq[String]) extends Product with Serializable

The target for all communications between the Spark Job Server and the underlying python subprocess.

When a Py4J gateway is created, it is passed an object of type Any which is available to the python process as a field on the gateway named endpoint. Since the object is of type Any, it is up to the python program to know which members to expect the endpoint to have.

The Spark Job Server python subprocess assumes the endpoint to be an implementation of this Trait, and attempts to access fields and methods accordingly.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JobEndpoint
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JobEndpoint(context: C, sparkConf: SparkConf, contextConfig: Config, jobId: String, jobConfig: Config, jobClass: String, py4JImports: Seq[String])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val context: C

    Permalink
  7. val contextConfig: Config

    Permalink
  8. def contextConfigAsHocon: String

    Permalink

    returns

    The contextConfig, which is a Typesafe Config object, serialized to HOCON, so that it can be deserialized by the Python implementation of Typesafe Config (pyhocon) in the subprocess.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getJobData: Any

    Permalink

    Method for python subprocess to retrieve job data in run stage.

    Method for python subprocess to retrieve job data in run stage.

    returns

    the jobData if it exists, else null

  13. def getPy4JImports: List[String]

    Permalink

    returns

    Returns the list of py4J imports as a Java list, which is the necessary type to have the list auto-converted to a python list.

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. val jobClass: String

    Permalink
  16. val jobConfig: Config

    Permalink
  17. def jobConfigAsHocon: String

    Permalink

    returns

    The jobConfig, which is a Typesafe Config object, serialized to HOCON, so that it can be deserialized by the Python implementation of Typesafe Config (pyhocon) in the subprocess.

  18. var jobData: Option[Any]

    Permalink
  19. val jobId: String

    Permalink
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. val py4JImports: Seq[String]

    Permalink
  24. var result: Option[Any]

    Permalink
  25. def setJobData(data: Any): Unit

    Permalink

    Method for the python subprocess to return jobdata after validate stage

    Method for the python subprocess to return jobdata after validate stage

    data

    the job data to be held for the run stage

  26. def setResult(res: Any): Unit

    Permalink

    Receives the result from the python subprocess.

    Receives the result from the python subprocess.

    res

    The result of the process. Although this can be Any, if it cannot be serialized by Spray Json then an error will occur when attempting to return this result to the client.

  27. def setValidationProblems(problems: ArrayList[String]): Unit

    Permalink

    Receives the list of validation problems from the python subprocess.

    Receives the list of validation problems from the python subprocess.

    problems

    A list of problems. This is of type java.util.ArrayList[String] because this is the format that Python lists are converted to by Py4J. This is converted to a Scala Seq internally.

  28. val sparkConf: SparkConf

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. var validationProblems: Option[Seq[String]]

    Permalink
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped