java.lang.Object
org.elasticsearch.compute.operator.FailureCollector
FailureCollector is responsible for collecting exceptions that occur in the compute engine.
The collected exceptions are categorized into task-cancelled and non-task-cancelled exceptions.
To limit memory usage, this class collects only the first 10 exceptions in each category by default.
When returning the accumulated failure to the caller, this class prefers non-task-cancelled exceptions
over task-cancelled ones as they are more useful for diagnosing issues.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the accumulated failure, preferring non-task-cancelled exceptions over task-cancelled ones.booleanvoid
-
Constructor Details
-
FailureCollector
public FailureCollector() -
FailureCollector
public FailureCollector(int maxExceptions)
-
-
Method Details
-
unwrapAndCollect
-
hasFailure
public boolean hasFailure()- Returns:
trueif any failure has been collected,falseotherwise
-
getFailure
Returns the accumulated failure, preferring non-task-cancelled exceptions over task-cancelled ones. Once this method builds the failure, incoming failures are discarded.- Returns:
- the accumulated failure, or
nullif no failure has been collected
-