Package alluxio.exception.status
Class FailedPreconditionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- alluxio.exception.status.AlluxioStatusException
-
- alluxio.exception.status.FailedPreconditionException
-
- All Implemented Interfaces:
java.io.Serializable
public class FailedPreconditionException extends AlluxioStatusException
Exception indicating that operation was rejected because the system is not in a state required for the operation's execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc. A litmus test that may help a service implementor in deciding between FailedPreconditionException, AbortedException, and UnavailableException:(a) Use UnavailableException if the client can retry just the failing call. (b) Use AbortedException if the client should retry at a higher-level (e.g., restarting a read-modify-write sequence). (c) Use FailedPreconditionException if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, FailedPreconditionException should be thrown since the client should not retry unless they have first fixed up the directory by deleting files from it. (d) Use FailedPreconditionException if the client performs conditional REST Get/Update/Delete on a resource and the resource on the server does not match the condition. E.g., conflicting read-modify-write on the same resource.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FailedPreconditionException(java.lang.String message)
FailedPreconditionException(java.lang.String message, java.lang.Throwable cause)
FailedPreconditionException(java.lang.Throwable cause)
-
Method Summary
-
Methods inherited from class alluxio.exception.status.AlluxioStatusException
from, fromAlluxioException, fromCheckedException, fromIOException, fromStatusRuntimeException, fromThrowable, getStatus, getStatusCode, toAlluxioException, toGrpcStatusException
-
-
-
-
Constructor Detail
-
FailedPreconditionException
public FailedPreconditionException(java.lang.String message)
- Parameters:
message
- the exception message
-
FailedPreconditionException
public FailedPreconditionException(java.lang.Throwable cause)
- Parameters:
cause
- the cause of the exception
-
FailedPreconditionException
public FailedPreconditionException(java.lang.String message, java.lang.Throwable cause)
- Parameters:
message
- the exception messagecause
- the cause of the exception
-
-