public class StackTraceSampleCoordinator extends Object
| Constructor and Description |
|---|
StackTraceSampleCoordinator(Executor executor,
long sampleTimeout)
Creates a new coordinator for the job.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelStackTraceSample(int sampleId,
Throwable 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.
|
CompletableFuture<StackTraceSample> |
triggerStackTraceSample(ExecutionVertex[] tasksToSample,
int numSamples,
org.apache.flink.api.common.time.Time delayBetweenSamples,
int maxStackTraceDepth)
Triggers a stack trace sample to all tasks.
|
public StackTraceSampleCoordinator(Executor executor, long sampleTimeout)
executor - to use to execute the futuressampleTimeout - 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 CompletableFuture<StackTraceSample> triggerStackTraceSample(ExecutionVertex[] tasksToSample, int numSamples, org.apache.flink.api.common.time.Time 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,
Throwable 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–2019 The Apache Software Foundation. All rights reserved.