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:
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
Class the enumerates all the possible error conditions.
This class is going to be deprecate soon, please use the new class BKException
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBookkeeper add entry quorum timeout exception.static classBookkeeper bookie exception.static classBookkeeper bookie handle not available exception.static classBookkeeper client closed exception.static classBookkeeper ledger in limbo and data may or may not exist.static classBookkeeper digest match exception.static classBookkeeper digest not initialized exception.static classBookkeeper duplicate entry id exception.static classBookkeeper illegal operation exception.static classBookkeeper incorrect parameter exception.static classBookkeeper interrupted exception.static classBookkeeper ledger closed exception.static classBookkeeper ledger exist exception.static classBookkeeper ledger fenced exception.static classBookkeeper ledger id overflow exception.static classBookkeeper ledger recovery exception.static classBookkeeper metadata serialization exception.static classBookkeeper metadata version exception.static classBookkeeper no such entry exception.static classBookkeeper no such ledger exists exception.static classBookkeeper no such ledger exists on metadata server exception.static classBookkeeper not enough bookies exception.static classBookkeeper protocol version exception.static classBookkeeper quorum exception.static classBookkeeper read exception.static classBookkeeper replication exception.static classBookkeeper security exception.static classBookkeeper timeout exception.static classBookkeeper too many requests exception.static classBookkeeper unauthorized access exception.static classBookkeeper unclosed fragment exception.static classBookkeeper unexpected condition exception.static classBookkeeper write exception.static classBookkeeper write on readonly bookie exception.static interfaceLegacy interface which holds constants for BookKeeper error codes.static classMetastore exception.static classZookeeper exception. -
Field Summary
FieldsFields inherited from class org.apache.bookkeeper.client.api.BKException
code -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BKExceptioncreate(int code) Create an exception from an error code.static intExtract an exception code from an BKException, or default to unexpected exception if throwable is not a BKException.static intgetExceptionCode(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, getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
HANDLER
-
-
Constructor Details
-
BKException
BKException(int code) -
BKException
BKException(int code, Throwable cause)
-
-
Method Details
-
create
Create an exception from an error code.- Parameters:
code- return error code- Returns:
- corresponding exception
-
getExceptionCode
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
Extract an exception code from an BKException, or default to unexpected exception if throwable is not a BKException.- See Also:
-