Packages

c

com.markblokpoel.lanag.util

SparkSimulation

case class SparkSimulation(local: Boolean = false, cores: Int = 4) extends Product with Serializable

A Spark session utility wrapper.

This session can be used to parallelize simulations. It requires the local machine to have a Spark driver installed, if used with flag local = true. See the Apache Spark website https://spark.apache.org/downloads.html for installation instructions.

local

Flag to specify whether or not should run in local mode.

cores

Number of cores to use in local mode, default is 4. Set to 0 to request maximum number of cores.

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparkSimulation
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SparkSimulation(local: Boolean = false, cores: Int = 4)

    local

    Flag to specify whether or not should run in local mode.

    cores

    Number of cores to use in local mode, default is 4. Set to 0 to request maximum number of cores.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from SparkSimulation to any2stringadd[SparkSimulation] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SparkSimulation, B)
    Implicit
    This member is added by an implicit conversion from SparkSimulation to ArrowAssoc[SparkSimulation] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def context: SparkContext

    Returns the local spark context.

  9. val cores: Int
  10. def ensuring(cond: (SparkSimulation) ⇒ Boolean, msg: ⇒ Any): SparkSimulation
    Implicit
    This member is added by an implicit conversion from SparkSimulation to Ensuring[SparkSimulation] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (SparkSimulation) ⇒ Boolean): SparkSimulation
    Implicit
    This member is added by an implicit conversion from SparkSimulation to Ensuring[SparkSimulation] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): SparkSimulation
    Implicit
    This member is added by an implicit conversion from SparkSimulation to Ensuring[SparkSimulation] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): SparkSimulation
    Implicit
    This member is added by an implicit conversion from SparkSimulation to Ensuring[SparkSimulation] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from SparkSimulation to StringFormat[SparkSimulation] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. val local: Boolean
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def parallelize[T](seq: Seq[T])(implicit arg0: ClassTag[T]): RDD[T]

    Parallelizes a sequence of type T.

    Parallelizes a sequence of type T.

    Use this to parallelize simulations and run them in a Spark session. All transformation applied to the resulting org.apache.spark.rdd.RDD are lazily executed in parallel.

    T

    Optional type parameter.

    seq

    Sequence of type T to be parallelized.

    returns

    A resilient distributed data structure org.apache.spark.rdd.RDD.

  24. def shutdown(): Unit

    Shuts down the Spark session.

    Shuts down the Spark session.

    Use this to cleanly close the Spark session and ensure all jobs are finished properly. No further sequences can be parallelized.

  25. val spark: SparkSession
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  30. def [B](y: B): (SparkSimulation, B)
    Implicit
    This member is added by an implicit conversion from SparkSimulation to ArrowAssoc[SparkSimulation] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from SparkSimulation to any2stringadd[SparkSimulation]

Inherited by implicit conversion StringFormat from SparkSimulation to StringFormat[SparkSimulation]

Inherited by implicit conversion Ensuring from SparkSimulation to Ensuring[SparkSimulation]

Inherited by implicit conversion ArrowAssoc from SparkSimulation to ArrowAssoc[SparkSimulation]

Ungrouped