Package org.apache.spark.scheduler
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
ConstructorsConstructorDescriptionAsyncEventQueue(String name, SparkConf conf, org.apache.spark.scheduler.LiveListenerBusMetrics metrics, org.apache.spark.scheduler.LiveListenerBus bus) -
Method Summary
Modifier and TypeMethodDescriptionstatic intname()static Objectvoidpost(SparkListenerEvent event) voidremoveListenerOnError(SparkListenerInterface listener) This can be overridden by subclasses if there is any extra cleanup to do when removing a listener.booleanwaitUntilEmpty(long deadline) For testing only.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.util.ListenerBus
addListener, findListenersByClass, isIgnorableException, listeners, postToAll, redactEvent, removeAllListeners, removeListenerMethods 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, withLogContextMethods inherited from interface org.apache.spark.scheduler.SparkListenerBus
doPostEvent
-
Constructor Details
-
AsyncEventQueue
-
-
Method Details
-
POISON_PILL
-
LOGGING_INTERVAL
public static int LOGGING_INTERVAL() -
name
-
post
-
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
Description copied from interface:ListenerBusThis 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:
removeListenerOnErrorin interfaceListenerBus<SparkListenerInterface,SparkListenerEvent> - Parameters:
listener- (undocumented)
-