Object

spark.jobserver

KMeansExample

Related Doc: package jobserver

Permalink

object KMeansExample extends SparkJob with NamedRddSupport

A Spark job example that implements the SparkJob trait and can be submitted to the job server.

Set the config with the sentence to split or count: input.string = "adsfasdf asdkf safksf a sdfa"

validate() returns SparkJobInvalid if there is no input.string

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KMeansExample
  2. NamedRddSupport
  3. NamedObjectSupport
  4. SparkJob
  5. SparkJobBase
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type C = SparkContext

    Permalink
    Definition Classes
    SparkJobSparkJobBase
  2. trait _NamedRdds extends AnyRef

    Permalink

    NamedRdds - a trait that gives you safe, concurrent creation and access to named RDDs (the native SparkContext interface only has access to RDDs by numbers).

    NamedRdds - a trait that gives you safe, concurrent creation and access to named RDDs (the native SparkContext interface only has access to RDDs by numbers). It facilitates easy sharing of RDDs amongst jobs sharing the same SparkContext. If two jobs simultaneously tries to create an RDD with the same name, only one will win and the other will retrieve the same one.

    Note that to take advantage of NamedRddSupport, a job must mix this in and use the APIs here instead of the native RDD cache(), otherwise we will not know about the names.

    Definition Classes
    NamedRddSupport

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. val K: Int

    Permalink
  5. val NUM_ITERATIONS: Int

    Permalink
  6. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  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 hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def namedObjects: NamedObjects

    Permalink
    Definition Classes
    NamedObjectSupport
  15. val namedObjectsPrivate: AtomicReference[NamedObjects]

    Permalink
    Definition Classes
    NamedObjectSupport
  16. def namedRdds: _NamedRdds

    Permalink
    Definition Classes
    NamedRddSupport
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def runJob(sc: SparkContext, config: Config): (Array[String], Array[String], Long)

    Permalink

    This is the entry point for a Spark Job Server to execute Spark jobs.

    This is the entry point for a Spark Job Server to execute Spark jobs. This function should create or reuse RDDs and return the result at the end, which the Job Server will cache or display.

    sc

    a SparkContext or similar for the job. May be reused across jobs.

    returns

    the job result

    Definition Classes
    KMeansExampleSparkJobBase
  21. def sampleAndReturn(dataWithPredictions: DataFrame): (Array[String], Array[String], Long)

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

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def validate(sc: SparkContext, config: Config): SparkJobValidation

    Permalink

    Assume that the job succeeds

    Assume that the job succeeds

    returns

    Always return SparkJobValid as this example will not do error checking

    Definition Classes
    KMeansExampleSparkJobBase
  25. final def wait(): Unit

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

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

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

Inherited from NamedRddSupport

Inherited from NamedObjectSupport

Inherited from SparkJob

Inherited from SparkJobBase

Inherited from AnyRef

Inherited from Any

Ungrouped