java.lang.Object
org.apache.arrow.flight.CallStatus
The result of a Flight RPC, consisting of a status code with an optional description and/or
exception that led to the status.
If raised or sent through FlightProducer.StreamListener.onError(Throwable)
or OutboundStreamListener.error(Throwable)
, the client call will raise the same error (a FlightRuntimeException
with the same FlightStatusCode
and description). The exception
within, if present, will not be sent to the client.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
static final CallStatus
-
Constructor Summary
ConstructorDescriptionCallStatus
(FlightStatusCode code) Create a new status with no cause or description.CallStatus
(FlightStatusCode code, Throwable cause, String description, ErrorFlightMetadata metadata) Create a new status. -
Method Summary
Modifier and TypeMethodDescriptioncause()
The exception that led to this result.code()
The status code describing the result of the RPC.A description of the result.metadata()
Metadata associated with the exception.Convert the status to an equivalent exception.toString()
Return a copy of this status with the given exception as the cause.withDescription
(String message) Return a copy of this status with an error message.withMetadata
(ErrorFlightMetadata metadata) Return a copy of this status with associated exception metadata.
-
Field Details
-
UNKNOWN
-
INTERNAL
-
INVALID_ARGUMENT
-
TIMED_OUT
-
NOT_FOUND
-
ALREADY_EXISTS
-
CANCELLED
-
UNAUTHENTICATED
-
UNAUTHORIZED
-
UNIMPLEMENTED
-
UNAVAILABLE
-
RESOURCE_EXHAUSTED
-
-
Constructor Details
-
CallStatus
public CallStatus(FlightStatusCode code, Throwable cause, String description, ErrorFlightMetadata metadata) Create a new status.- Parameters:
code
- The status code.cause
- An exception that resulted in this status (or null).description
- A description of the status (or null).
-
CallStatus
Create a new status with no cause or description.- Parameters:
code
- The status code.
-
-
Method Details
-
code
The status code describing the result of the RPC. -
cause
The exception that led to this result. May be null. -
description
A description of the result. -
metadata
Metadata associated with the exception.May be null.
-
withDescription
Return a copy of this status with an error message. -
withCause
Return a copy of this status with the given exception as the cause. This will not be sent over the wire. -
withMetadata
Return a copy of this status with associated exception metadata. -
toRuntimeException
Convert the status to an equivalent exception. -
toString
-