Packages

package util

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait LexicalThreadLocal[T] extends AnyRef

    Helper trait for defining thread locals with lexical scoping.

    Helper trait for defining thread locals with lexical scoping. With this helper, the thread local is private and can only be set by the Handle. The Handle only exposes the thread local value to functions passed into its runWith method. This pattern allows for the lifetime of the thread local value to be strictly controlled.

    Rather than calling tl.set(...) and tl.remove() you would get a handle and execute your code in handle.runWith { ... }.

    Example:

    object Credentials extends LexicalThreadLocal[Int] {
      def create(creds: Map[String, String]) = new Handle(Some(creds))
    }
    ...
    val handle = Credentials.create(Map("key" -> "value"))
    assert(Credentials.get() == None)
    handle.runWith {
      assert(Credentials.get() == Some(Map("key" -> "value")))
    }

Value Members

  1. object LogUtils

    :: : DeveloperApi :: Utils for querying Spark logs with Spark SQL.

    :: : DeveloperApi :: Utils for querying Spark logs with Spark SQL.

    Annotations
    @DeveloperApi()
    Since

    4.0.0

  2. object SparkEnvUtils extends SparkEnvUtils

Ungrouped