public class StackTraceSampleCoordinator extends Object
Constructor and Description |
---|
StackTraceSampleCoordinator(akka.actor.ActorSystem actorSystem,
int sampleTimeout)
Creates a new coordinator for the job.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelStackTraceSample(int sampleId,
Exception cause)
Cancels a pending sample.
|
void |
collectStackTraces(int sampleId,
ExecutionAttemptID executionId,
List<StackTraceElement[]> stackTraces)
Collects stack traces of a task.
|
void |
shutDown()
Shuts down the coordinator.
|
scala.concurrent.Future<StackTraceSample> |
triggerStackTraceSample(ExecutionVertex[] tasksToSample,
int numSamples,
scala.concurrent.duration.FiniteDuration delayBetweenSamples,
int maxStackTraceDepth)
Triggers a stack trace sample to all tasks.
|
public StackTraceSampleCoordinator(akka.actor.ActorSystem actorSystem, int sampleTimeout)
sampleTimeout
- Time out after the expected sampling duration.
This is added to the expected duration of a
sample, which is determined by the number of
samples and the delay between each sample.public scala.concurrent.Future<StackTraceSample> triggerStackTraceSample(ExecutionVertex[] tasksToSample, int numSamples, scala.concurrent.duration.FiniteDuration delayBetweenSamples, int maxStackTraceDepth)
tasksToSample
- Tasks to sample.numSamples
- Number of stack trace samples to collect.delayBetweenSamples
- Delay between consecutive samples.maxStackTraceDepth
- Maximum depth of the stack trace. 0 indicates
no maximum and keeps the complete stack trace.public void cancelStackTraceSample(int sampleId, Exception cause)
sampleId
- ID of the sample to cancel.cause
- Cause of the cancelling (can be null
).public void shutDown()
After shut down, no further operations are executed.
public void collectStackTraces(int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces)
sampleId
- ID of the sample.executionId
- ID of the sampled task.stackTraces
- Stack traces of the sampled task.IllegalStateException
- If unknown sample ID and not recently
finished or cancelled sample.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.