public class AlluxioStatusException extends IOException
getStatus()
can be used to determine the represented
class of error.Constructor and Description |
---|
AlluxioStatusException(Status status,
String message) |
AlluxioStatusException(Status status,
String message,
Throwable cause) |
AlluxioStatusException(Status status,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
static AlluxioStatusException |
from(Status status,
String m)
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 |
fromCheckedException(Throwable throwable)
Converts checked throwables to Alluxio status exceptions.
|
static AlluxioStatusException |
fromIOException(IOException ioe)
Converts an IOException to a corresponding status exception.
|
static AlluxioStatusException |
fromThrift(AlluxioTException e)
Converts an Alluxio exception from Thrift representation to native representation.
|
static AlluxioStatusException |
fromThrowable(Throwable t)
Converts an arbitrary throwable to an Alluxio status exception.
|
Status |
getStatus() |
AlluxioException |
toAlluxioException() |
AlluxioTException |
toThrift() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AlluxioStatusException(Status status, String message)
status
- the status code for this exceptionmessage
- the exception messagepublic AlluxioStatusException(Status status, Throwable cause)
status
- the status code for this exceptioncause
- the cause of the exceptionpublic Status getStatus()
public AlluxioTException toThrift()
public AlluxioException toAlluxioException()
AlluxioException
corresponding to this exception if there is one;
otherwise return a generic AlluxioException
public static AlluxioStatusException fromThrift(AlluxioTException e)
e
- the Thrift exceptionpublic static AlluxioStatusException from(Status status, String m)
Status.OK
.status
- the statusm
- the messageAlluxioStatusException
for the given status and messagepublic static AlluxioStatusException fromCheckedException(Throwable throwable)
throwable
- a throwableAlluxioStatusException
public static AlluxioStatusException fromThrowable(Throwable t)
t
- a throwableAlluxioStatusException
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.