Package org.apache.bookkeeper.client
Class BKException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.bookkeeper.client.api.BKException
-
- org.apache.bookkeeper.client.BKException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BKException.BKAddEntryQuorumTimeoutException,BKException.BKBookieException,BKException.BKBookieHandleNotAvailableException,BKException.BKClientClosedException,BKException.BKDataUnknownException,BKException.BKDigestMatchException,BKException.BKDigestNotInitializedException,BKException.BKDuplicateEntryIdException,BKException.BKIllegalOpException,BKException.BKIncorrectParameterException,BKException.BKInterruptedException,BKException.BKLedgerClosedException,BKException.BKLedgerExistException,BKException.BKLedgerFencedException,BKException.BKLedgerIdOverflowException,BKException.BKLedgerRecoveryException,BKException.BKMetadataSerializationException,BKException.BKMetadataVersionException,BKException.BKNoSuchEntryException,BKException.BKNoSuchLedgerExistsException,BKException.BKNoSuchLedgerExistsOnMetadataServerException,BKException.BKNotEnoughBookiesException,BKException.BKProtocolVersionException,BKException.BKQuorumException,BKException.BKReadException,BKException.BKReplicationException,BKException.BKSecurityException,BKException.BKTimeoutException,BKException.BKTooManyRequestsException,BKException.BKUnauthorizedAccessException,BKException.BKUnclosedFragmentException,BKException.BKUnexpectedConditionException,BKException.BKWriteException,BKException.BKWriteOnReadOnlyBookieException,BKException.MetaStoreException,BKException.ZKException
public abstract class BKException extends BKException
Class the enumerates all the possible error conditions.This class is going to be deprecate soon, please use the new class
BKException- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBKException.BKAddEntryQuorumTimeoutExceptionBookkeeper add entry quorum timeout exception.static classBKException.BKBookieExceptionBookkeeper bookie exception.static classBKException.BKBookieHandleNotAvailableExceptionBookkeeper bookie handle not available exception.static classBKException.BKClientClosedExceptionBookkeeper client closed exception.static classBKException.BKDataUnknownExceptionBookkeeper ledger in limbo and data may or may not exist.static classBKException.BKDigestMatchExceptionBookkeeper digest match exception.static classBKException.BKDigestNotInitializedExceptionBookkeeper digest not initialized exception.static classBKException.BKDuplicateEntryIdExceptionBookkeeper duplicate entry id exception.static classBKException.BKIllegalOpExceptionBookkeeper illegal operation exception.static classBKException.BKIncorrectParameterExceptionBookkeeper incorrect parameter exception.static classBKException.BKInterruptedExceptionBookkeeper interrupted exception.static classBKException.BKLedgerClosedExceptionBookkeeper ledger closed exception.static classBKException.BKLedgerExistExceptionBookkeeper ledger exist exception.static classBKException.BKLedgerFencedExceptionBookkeeper ledger fenced exception.static classBKException.BKLedgerIdOverflowExceptionBookkeeper ledger id overflow exception.static classBKException.BKLedgerRecoveryExceptionBookkeeper ledger recovery exception.static classBKException.BKMetadataSerializationExceptionBookkeeper metadata serialization exception.static classBKException.BKMetadataVersionExceptionBookkeeper metadata version exception.static classBKException.BKNoSuchEntryExceptionBookkeeper no such entry exception.static classBKException.BKNoSuchLedgerExistsExceptionBookkeeper no such ledger exists exception.static classBKException.BKNoSuchLedgerExistsOnMetadataServerExceptionBookkeeper no such ledger exists on metadata server exception.static classBKException.BKNotEnoughBookiesExceptionBookkeeper not enough bookies exception.static classBKException.BKProtocolVersionExceptionBookkeeper protocol version exception.static classBKException.BKQuorumExceptionBookkeeper quorum exception.static classBKException.BKReadExceptionBookkeeper read exception.static classBKException.BKReplicationExceptionBookkeeper replication exception.static classBKException.BKSecurityExceptionBookkeeper security exception.static classBKException.BKTimeoutExceptionBookkeeper timeout exception.static classBKException.BKTooManyRequestsExceptionBookkeeper too many requests exception.static classBKException.BKUnauthorizedAccessExceptionBookkeeper unauthorized access exception.static classBKException.BKUnclosedFragmentExceptionBookkeeper unclosed fragment exception.static classBKException.BKUnexpectedConditionExceptionBookkeeper unexpected condition exception.static classBKException.BKWriteExceptionBookkeeper write exception.static classBKException.BKWriteOnReadOnlyBookieExceptionBookkeeper write on readonly bookie exception.static interfaceBKException.CodeLegacy interface which holds constants for BookKeeper error codes.static classBKException.MetaStoreExceptionMetastore exception.static classBKException.ZKExceptionZookeeper exception.
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<java.lang.Throwable,BKException>HANDLER-
Fields inherited from class org.apache.bookkeeper.client.api.BKException
code
-
-
Constructor Summary
Constructors Constructor Description BKException(int code)BKException(int code, java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BKExceptioncreate(int code)Create an exception from an error code.static intgetExceptionCode(java.lang.Throwable t)Extract an exception code from an BKException, or default to unexpected exception if throwable is not a BKException.static intgetExceptionCode(java.lang.Throwable t, int defaultCode)Extract an exception code from an BKException, or use a default if it's another type.-
Methods inherited from class org.apache.bookkeeper.client.api.BKException
codeLogger, getCode, getMessage
-
-
-
-
Field Detail
-
HANDLER
public static final java.util.function.Function<java.lang.Throwable,BKException> HANDLER
-
-
Method Detail
-
create
public static BKException create(int code)
Create an exception from an error code.- Parameters:
code- return error code- Returns:
- corresponding exception
-
getExceptionCode
public static int getExceptionCode(java.lang.Throwable t, int defaultCode)Extract an exception code from an BKException, or use a default if it's another type. The throwable is null, assume that no exception took place and returnBKException.Code.OK.
-
getExceptionCode
public static int getExceptionCode(java.lang.Throwable t)
Extract an exception code from an BKException, or default to unexpected exception if throwable is not a BKException.- See Also:
getExceptionCode(Throwable,int)
-
-