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.

  • 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)