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 client (4xx), server (5xx), shard-unavailable errors,
and cancellation errors. To limit memory usage, this class collects only the first 10 exceptions in
each category by default. When returning the accumulated failures to the caller, this class prefers
client (4xx) errors over server (5xx) errors, shard-unavailable errors, and cancellation errors,
as they are more useful for diagnosing issues.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the accumulated failure, preferring client (4xx) errors over server (5xx) errors and cancellation errors, as they are more useful for diagnosing issues.booleanvoidstatic Exception
-
Constructor Details
-
FailureCollector
public FailureCollector() -
FailureCollector
public FailureCollector(int maxExceptions)
-
-
Method Details
-
unwrapTransportException
-
unwrapAndCollect
-
hasFailure
public boolean hasFailure()- Returns:
trueif any failure has been collected,falseotherwise
-
getFailure
Returns the accumulated failure, preferring client (4xx) errors over server (5xx) errors and cancellation errors, as they are more useful for diagnosing issues. Once this method builds the failure, incoming failures are discarded.- Returns:
- the accumulated failure, or
nullif no failure has been collected
-