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
ConstructorDescriptionAsyncEventQueue
(String name, SparkConf conf, org.apache.spark.scheduler.LiveListenerBusMetrics metrics, org.apache.spark.scheduler.LiveListenerBus bus) -
Method Summary
Modifier and TypeMethodDescriptionstatic int
name()
static Object
void
post
(SparkListenerEvent event) void
removeListenerOnError
(SparkListenerInterface listener) 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.util.ListenerBus
addListener, findListenersByClass, isIgnorableException, listeners, postToAll, redactEvent, removeAllListeners, removeListener
Methods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, 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
-
-
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: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 interfaceListenerBus<SparkListenerInterface,
SparkListenerEvent> - Parameters:
listener
- (undocumented)
-