Package org.apache.bookkeeper.client
Class BatchedReadOp.SequenceReadRequest
java.lang.Object
org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
org.apache.bookkeeper.client.BatchedReadOp.BatchedLedgerEntryRequest
org.apache.bookkeeper.client.BatchedReadOp.SequenceReadRequest
- All Implemented Interfaces:
SpeculativeRequestExecutor
- Enclosing class:
- BatchedReadOp
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final BitSet(package private) int(package private) static final int(package private) final BitSetFields inherited from class org.apache.bookkeeper.client.BatchedReadOp.BatchedLedgerEntryRequest
entries, lId, maxCount, maxSizeFields inherited from class org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
complete, eId, ensemble, firstError, numBookiesMissingEntry, rc, writeSet -
Constructor Summary
ConstructorsConstructorDescriptionSequenceReadRequest(List<BookieId> ensemble, long lId, long eId, int maxCount, long maxSize) -
Method Summary
Modifier and TypeMethodDescription(package private) booleancomplete(int bookieIndex, BookieId host, ByteBufList bufList) (package private) voidlogErrorAndReattemptRead(int bookieIndex, BookieId host, String errMsg, int rc) Log error errMsg and reattempt read from host.(package private) BookieIdmaybeSendSpeculativeRead(BitSet heardFrom) Send to next replica speculatively, if required and possible.(package private) voidread()Execute the read request.(package private) BookieIdMethods inherited from class org.apache.bookkeeper.client.BatchedReadOp.BatchedLedgerEntryRequest
toStringMethods inherited from class org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
close, fail, getRc, isComplete, issueSpeculativeRequest
-
Field Details
-
NOT_FOUND
static final int NOT_FOUND- See Also:
-
nextReplicaIndexToReadFrom
int nextReplicaIndexToReadFrom -
sentReplicas
-
erroredReplicas
-
-
Constructor Details
-
SequenceReadRequest
-
-
Method Details
-
read
void read()Description copied from class:ReadOpBase.LedgerEntryRequestExecute the read request.- Specified by:
readin classReadOpBase.LedgerEntryRequest
-
maybeSendSpeculativeRead
Description copied from class:ReadOpBase.LedgerEntryRequestSend to next replica speculatively, if required and possible. This returns the host we may have sent to for unit testing.- Specified by:
maybeSendSpeculativeReadin classReadOpBase.LedgerEntryRequest- Parameters:
heardFrom- the set of hosts that we already received responses.- Returns:
- host we sent to if we sent. null otherwise.
-
sendNextRead
BookieId sendNextRead() -
logErrorAndReattemptRead
Description copied from class:ReadOpBase.LedgerEntryRequestLog error errMsg and reattempt read from host.- Overrides:
logErrorAndReattemptReadin classReadOpBase.LedgerEntryRequest- Parameters:
bookieIndex- bookie indexhost- host that just responderrMsg- error msg to logrc- read result code
-
complete
- Overrides:
completein classBatchedReadOp.BatchedLedgerEntryRequest
-