Class AsyncEventQueue

Object
org.apache.spark.scheduler.AsyncEventQueue
All Implemented Interfaces:
org.apache.spark.internal.Logging, SparkListenerBus, ListenerBus<SparkListenerInterface,SparkListenerEvent>

public class AsyncEventQueue extends Object implements SparkListenerBus, org.apache.spark.internal.Logging
An asynchronous queue for events. All events posted to this queue will be delivered to the child listeners in a separate thread.

Delivery will only begin when the start() method is called. The stop() method should be called when no more events need to be delivered.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging

    org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
  • Constructor Summary

    Constructors
    Constructor
    Description
    AsyncEventQueue(String name, SparkConf conf, org.apache.spark.scheduler.LiveListenerBusMetrics metrics, org.apache.spark.scheduler.LiveListenerBus bus)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
     
     
    static Object
     
    void
     
    void
    This can be overridden by subclasses if there is any extra cleanup to do when removing a listener.
    boolean
    waitUntilEmpty(long deadline)
    For testing only.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.spark.internal.Logging

    initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logBasedOnLevel, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext

    Methods inherited from interface org.apache.spark.scheduler.SparkListenerBus

    doPostEvent
  • Constructor Details

    • AsyncEventQueue

      public AsyncEventQueue(String name, SparkConf conf, org.apache.spark.scheduler.LiveListenerBusMetrics metrics, org.apache.spark.scheduler.LiveListenerBus bus)
  • Method Details

    • POISON_PILL

      public static Object POISON_PILL()
    • LOGGING_INTERVAL

      public static int LOGGING_INTERVAL()
    • name

      public String name()
    • post

      public void post(SparkListenerEvent event)
    • waitUntilEmpty

      public boolean waitUntilEmpty(long deadline)
      For testing only. Wait until there are no more events in the queue.

      Parameters:
      deadline - (undocumented)
      Returns:
      true if the queue is empty.
    • removeListenerOnError

      public void removeListenerOnError(SparkListenerInterface listener)
      Description copied from interface: ListenerBus
      This can be overridden by subclasses if there is any extra cleanup to do when removing a listener. In particular AsyncEventQueues can clean up queues in the LiveListenerBus.
      Specified by:
      removeListenerOnError in interface ListenerBus<SparkListenerInterface,SparkListenerEvent>
      Parameters:
      listener - (undocumented)