class SharedVariable[T] extends Serializable

Holds a variable shared among all workers. Useful to use non-serializable objects in Spark closures.

Note this code has been borrowed from: https://www.nicolaferraro.me/2016/02/22/using-non-serializable-objects-in-apache-spark/

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SharedVariable
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SharedVariable(constructor: ⇒ T)(implicit arg0: ClassTag[T])

Value Members

  1. def get: T