Class 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 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 message
        cause - the cause of the exception