public class AlluxioStatusException extends IOException
getStatusCode()
can be used to determine the represented
class of error.Constructor and Description |
---|
AlluxioStatusException(io.grpc.Status status) |
Modifier and Type | Method and Description |
---|---|
static AlluxioStatusException |
from(io.grpc.Status status)
Converts an Alluxio exception from status and message representation to native representation.
|
static AlluxioStatusException |
fromAlluxioException(AlluxioException ae)
Converts checked Alluxio exceptions to Alluxio status exceptions.
|
static AlluxioStatusException |
fromIOException(IOException ioe)
Converts an IOException to a corresponding status exception.
|
static AlluxioStatusException |
fromStatusRuntimeException(io.grpc.StatusRuntimeException e)
Converts a gRPC StatusRuntimeException to an Alluxio status exception.
|
static AlluxioStatusException |
fromThrowable(Throwable t)
Converts an arbitrary throwable to an Alluxio status exception.
|
io.grpc.Status |
getStatus() |
io.grpc.Status.Code |
getStatusCode() |
AlluxioException |
toAlluxioException() |
io.grpc.StatusException |
toGrpcStatusException() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AlluxioStatusException(io.grpc.Status status)
status
- the status code for this exceptionpublic io.grpc.Status getStatus()
public io.grpc.Status.Code getStatusCode()
public AlluxioException toAlluxioException()
AlluxioException
corresponding to this exception if there is one;
otherwise return a generic AlluxioException
public io.grpc.StatusException toGrpcStatusException()
public static AlluxioStatusException from(io.grpc.Status status)
Status.OK
.status
- the statusAlluxioStatusException
for the given status and messagepublic static AlluxioStatusException fromThrowable(Throwable t)
t
- a throwableAlluxioStatusException
public static AlluxioStatusException fromStatusRuntimeException(io.grpc.StatusRuntimeException e)
e
- a gRPC StatusRuntimeExceptionAlluxioStatusException
public static AlluxioStatusException fromAlluxioException(AlluxioException ae)
ae
- the Alluxio exception to convertAlluxioStatusException
public static AlluxioStatusException fromIOException(IOException ioe)
UnavailableException
.ioe
- the IO exception to convertCopyright © 2023. All Rights Reserved.