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 class
BKException.BKAddEntryQuorumTimeoutException
Bookkeeper add entry quorum timeout exception.static class
BKException.BKBookieException
Bookkeeper bookie exception.static class
BKException.BKBookieHandleNotAvailableException
Bookkeeper bookie handle not available exception.static class
BKException.BKClientClosedException
Bookkeeper client closed exception.static class
BKException.BKDataUnknownException
Bookkeeper ledger in limbo and data may or may not exist.static class
BKException.BKDigestMatchException
Bookkeeper digest match exception.static class
BKException.BKDigestNotInitializedException
Bookkeeper digest not initialized exception.static class
BKException.BKDuplicateEntryIdException
Bookkeeper duplicate entry id exception.static class
BKException.BKIllegalOpException
Bookkeeper illegal operation exception.static class
BKException.BKIncorrectParameterException
Bookkeeper incorrect parameter exception.static class
BKException.BKInterruptedException
Bookkeeper interrupted exception.static class
BKException.BKLedgerClosedException
Bookkeeper ledger closed exception.static class
BKException.BKLedgerExistException
Bookkeeper ledger exist exception.static class
BKException.BKLedgerFencedException
Bookkeeper ledger fenced exception.static class
BKException.BKLedgerIdOverflowException
Bookkeeper ledger id overflow exception.static class
BKException.BKLedgerRecoveryException
Bookkeeper ledger recovery exception.static class
BKException.BKMetadataSerializationException
Bookkeeper metadata serialization exception.static class
BKException.BKMetadataVersionException
Bookkeeper metadata version exception.static class
BKException.BKNoSuchEntryException
Bookkeeper no such entry exception.static class
BKException.BKNoSuchLedgerExistsException
Bookkeeper no such ledger exists exception.static class
BKException.BKNoSuchLedgerExistsOnMetadataServerException
Bookkeeper no such ledger exists on metadata server exception.static class
BKException.BKNotEnoughBookiesException
Bookkeeper not enough bookies exception.static class
BKException.BKProtocolVersionException
Bookkeeper protocol version exception.static class
BKException.BKQuorumException
Bookkeeper quorum exception.static class
BKException.BKReadException
Bookkeeper read exception.static class
BKException.BKReplicationException
Bookkeeper replication exception.static class
BKException.BKSecurityException
Bookkeeper security exception.static class
BKException.BKTimeoutException
Bookkeeper timeout exception.static class
BKException.BKTooManyRequestsException
Bookkeeper too many requests exception.static class
BKException.BKUnauthorizedAccessException
Bookkeeper unauthorized access exception.static class
BKException.BKUnclosedFragmentException
Bookkeeper unclosed fragment exception.static class
BKException.BKUnexpectedConditionException
Bookkeeper unexpected condition exception.static class
BKException.BKWriteException
Bookkeeper write exception.static class
BKException.BKWriteOnReadOnlyBookieException
Bookkeeper write on readonly bookie exception.static interface
BKException.Code
Legacy interface which holds constants for BookKeeper error codes.static class
BKException.MetaStoreException
Metastore exception.static class
BKException.ZKException
Zookeeper 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 BKException
create(int code)
Create an exception from an error code.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.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.-
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)
-
-