public final class EventCollector extends TimerTask implements ProfilingListener
This class is thread-safe.
| Constructor and Description |
|---|
EventCollector(int clientQueryInterval)
Constructs a new event collector and starts
its background cleanup routine.
|
| Modifier and Type | Method and Description |
|---|---|
void |
getEventsForJob(JobID jobID,
List<AbstractEvent> eventList,
boolean includeManagementEvents)
Retrieves and adds the collected events for the job with the given job ID to the provided list.
|
ManagementGraph |
getManagementGraph(JobID jobID)
Returns the
ManagementGraph object for the job with the given ID from the map of recently created
management graphs. |
void |
getRecentJobs(List<RecentJobEvent> eventList) |
void |
processProfilingEvents(ProfilingEvent profilingEvent) |
void |
registerArchivist(ArchiveListener al)
Register Archivist to archive
|
void |
registerJob(ExecutionGraph executionGraph,
boolean profilingAvailable,
long submissionTimestamp)
Registers a job in form of its execution graph representation
with the job progress collector.
|
void |
run()
This method will periodically be called to clean up expired
collected events.
|
void |
shutdown()
Stops the timer thread and cleans up the
data structure which stores the collected events.
|
cancel, scheduledExecutionTimepublic EventCollector(int clientQueryInterval)
clientQueryInterval - the interval with which clients query for eventspublic void getEventsForJob(JobID jobID, List<AbstractEvent> eventList, boolean includeManagementEvents)
jobID - the ID of the job to retrieve the events foreventList - the list to which the events shall be addedincludeManagementEvents - true if ManagementEvent objects shall be added to the list as well,
false otherwisepublic void getRecentJobs(List<RecentJobEvent> eventList)
public void shutdown()
public void registerJob(ExecutionGraph executionGraph, boolean profilingAvailable, long submissionTimestamp)
executionGraph - the execution graph representing the jobprofilingAvailable - indicates if profiling data is available for this jobsubmissionTimestamp - the submission time stamp of the jobpublic void run()
public void processProfilingEvents(ProfilingEvent profilingEvent)
processProfilingEvents in interface ProfilingListenerpublic ManagementGraph getManagementGraph(JobID jobID)
ManagementGraph object for the job with the given ID from the map of recently created
management graphs.jobID - the ID of the job the management graph shall be retrieved fornull if no such graph existspublic void registerArchivist(ArchiveListener al)
Copyright © 2014 The Apache Software Foundation. All rights reserved.