Packages

t

org.apache.spark.api.plugin

PluginContext

trait PluginContext extends AnyRef

:: DeveloperApi :: Context information and operations for plugins loaded by Spark.

An instance of this class is provided to plugins in their initialization method. It is safe for plugins to keep a reference to the instance for later use (for example, to send messages to the plugin's driver component).

Context instances are plugin-specific, so metrics and messages are tied each plugin. It is not possible for a plugin to directly interact with other plugins.

Annotations
@DeveloperApi()
Source
PluginContext.java
Since

3.0.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PluginContext
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def ask(message: AnyRef): AnyRef

    Send an RPC to the plugin's driver-side component.

    Send an RPC to the plugin's driver-side component.

    This method sends a message to the driver-side component of the plugin, and blocks until a reply arrives, or the configured RPC ask timeout (spark.rpc.askTimeout) elapses.

    If the driver replies with an error, an exception with the corresponding error will be thrown.

    The message must be serializable.

    message

    Message to be sent.

    returns

    The reply from the driver-side component.

  2. abstract def conf(): SparkConf

    Configuration of the Spark application.

  3. abstract def executorID(): String

    Executor ID of the process.

    Executor ID of the process. On the driver, this will identify the driver.

  4. abstract def hostname(): String

    The host name which is being used by the Spark process for communication.

  5. abstract def metricRegistry(): MetricRegistry

    Registry where to register metrics published by the plugin associated with this context.

  6. abstract def resources(): Map[String, ResourceInformation]

    The custom resources (GPUs, FPGAs, etc) allocated to driver or executor.

  7. abstract def send(message: AnyRef): Unit

    Send a message to the plugin's driver-side component.

    Send a message to the plugin's driver-side component.

    This method sends a message to the driver-side component of the plugin, without expecting a reply. It returns as soon as the message is enqueued for sending.

    The message must be serializable.

    message

    Message to be sent.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped