Package org.apache.bookkeeper.proto
Interface BookieProtocol
-
public interface BookieProtocolThe packets of the Bookie protocol all have a 4-byte integer indicating the type of request or response at the very beginning of the packet followed by a payload.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBookieProtocol.AddResponseA response that adds data.static classBookieProtocol.AuthRequestAn authentication request.static classBookieProtocol.AuthResponseA response with an authentication message.static classBookieProtocol.BatchedReadRequestThe request for reading data with batch optimization.static classBookieProtocol.BatchedReadResponseThe response for batched read.static classBookieProtocol.ErrorResponseAn error response.static classBookieProtocol.PacketHeaderThe first int of a packet is the header.static classBookieProtocol.ParsedAddRequestThis is similar to add request, but it used when processing the request on the bookie side.static classBookieProtocol.ReadRequestA Request that reads data.static classBookieProtocol.ReadResponseA request that reads data.static classBookieProtocol.RequestA Bookie request object.static classBookieProtocol.ResponseA response object.
-
Field Summary
Fields Modifier and Type Field Description static byteADDENTRYThe Add entry request payload will be a ledger entry exactly as it should be logged.static byteAUTHAuth message.static byteBATCH_READ_ENTRYstatic byteCURRENT_PROTOCOL_VERSIONCurrent version of the protocol, which client will use.static intEBADREQThe error code that indicates an invalid request type.static intEBADVERSIONThe server version is incompatible with the client.static intEFENCEDAttempt to write to fenced ledger.static intEIOGeneral error occurred at the server.static intENOENTRYThe error code that indicates that the requested entry does not exist.static intENOLEDGERThe error code that indicates that the ledger does not exist.static intEOKThe error code that indicates success.static intEREADONLYThe server is running as read-only mode.static intETOOMANYREQUESTSToo many concurrent requests.static intEUAUnauthorized access to ledger.static intEUNKNOWNLEDGERSTATELedger in unknown state.static shortFLAG_DO_FENCINGstatic shortFLAG_HIGH_PRIORITYstatic shortFLAG_NONEstatic shortFLAG_RECOVERY_ADDstatic byteGET_BOOKIE_INFOstatic longINVALID_ENTRY_IDEntry Entry ID.static longLAST_ADD_CONFIRMEDEntry identifier representing a request to obtain the last add entry confirmed.static byteLOWEST_COMPAT_PROTOCOL_VERSIONLowest protocol version which will work with the bookie.static intMASTER_KEY_LENGTHThe length of the master key in add packets.static byteREAD_LACstatic byteREADENTRYThe Read entry request payload will be the ledger number and entry number to read.static byteWRITE_LAC
-
-
-
Field Detail
-
LOWEST_COMPAT_PROTOCOL_VERSION
static final byte LOWEST_COMPAT_PROTOCOL_VERSION
Lowest protocol version which will work with the bookie.- See Also:
- Constant Field Values
-
CURRENT_PROTOCOL_VERSION
static final byte CURRENT_PROTOCOL_VERSION
Current version of the protocol, which client will use.- See Also:
- Constant Field Values
-
INVALID_ENTRY_ID
static final long INVALID_ENTRY_ID
Entry Entry ID. To be used when no valid entry id can be assigned.- See Also:
- Constant Field Values
-
LAST_ADD_CONFIRMED
static final long LAST_ADD_CONFIRMED
Entry identifier representing a request to obtain the last add entry confirmed.- See Also:
- Constant Field Values
-
MASTER_KEY_LENGTH
static final int MASTER_KEY_LENGTH
The length of the master key in add packets. This is fixed at 20 for historic reasons. This is because it is always generated using the MacDigestManager regardless of whether Mac is being used for the digest or not- See Also:
- Constant Field Values
-
ADDENTRY
static final byte ADDENTRY
The Add entry request payload will be a ledger entry exactly as it should be logged. The response payload will be a 4-byte integer that has the error code followed by the 8-byte ledger number and 8-byte entry number of the entry written.- See Also:
- Constant Field Values
-
READENTRY
static final byte READENTRY
The Read entry request payload will be the ledger number and entry number to read. (The ledger number is an 8-byte integer and the entry number is a 8-byte integer.) The response payload will be a 4-byte integer representing an error code and a ledger entry if the error code is EOK, otherwise it will be the 8-byte ledger number and the 4-byte entry number requested. (Note that the first sixteen bytes of the entry happen to be the ledger number and entry number as well.)- See Also:
- Constant Field Values
-
AUTH
static final byte AUTH
Auth message. This code is for passing auth messages between the auth providers on the client and bookie. The message payload is determined by the auth providers themselves.- See Also:
- Constant Field Values
-
READ_LAC
static final byte READ_LAC
- See Also:
- Constant Field Values
-
WRITE_LAC
static final byte WRITE_LAC
- See Also:
- Constant Field Values
-
GET_BOOKIE_INFO
static final byte GET_BOOKIE_INFO
- See Also:
- Constant Field Values
-
BATCH_READ_ENTRY
static final byte BATCH_READ_ENTRY
- See Also:
- Constant Field Values
-
EOK
static final int EOK
The error code that indicates success.- See Also:
- Constant Field Values
-
ENOLEDGER
static final int ENOLEDGER
The error code that indicates that the ledger does not exist.- See Also:
- Constant Field Values
-
ENOENTRY
static final int ENOENTRY
The error code that indicates that the requested entry does not exist.- See Also:
- Constant Field Values
-
EBADREQ
static final int EBADREQ
The error code that indicates an invalid request type.- See Also:
- Constant Field Values
-
EIO
static final int EIO
General error occurred at the server.- See Also:
- Constant Field Values
-
EUA
static final int EUA
Unauthorized access to ledger.- See Also:
- Constant Field Values
-
EBADVERSION
static final int EBADVERSION
The server version is incompatible with the client.- See Also:
- Constant Field Values
-
EFENCED
static final int EFENCED
Attempt to write to fenced ledger.- See Also:
- Constant Field Values
-
EREADONLY
static final int EREADONLY
The server is running as read-only mode.- See Also:
- Constant Field Values
-
ETOOMANYREQUESTS
static final int ETOOMANYREQUESTS
Too many concurrent requests.- See Also:
- Constant Field Values
-
EUNKNOWNLEDGERSTATE
static final int EUNKNOWNLEDGERSTATE
Ledger in unknown state.- See Also:
- Constant Field Values
-
FLAG_NONE
static final short FLAG_NONE
- See Also:
- Constant Field Values
-
FLAG_DO_FENCING
static final short FLAG_DO_FENCING
- See Also:
- Constant Field Values
-
FLAG_RECOVERY_ADD
static final short FLAG_RECOVERY_ADD
- See Also:
- Constant Field Values
-
FLAG_HIGH_PRIORITY
static final short FLAG_HIGH_PRIORITY
- See Also:
- Constant Field Values
-
-