Package org.apache.bookkeeper.client
Class PendingReadOp.ParallelReadRequest
java.lang.Object
org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
org.apache.bookkeeper.client.PendingReadOp.SingleLedgerEntryRequest
org.apache.bookkeeper.client.PendingReadOp.ParallelReadRequest
- All Implemented Interfaces:
SpeculativeRequestExecutor
- Enclosing class:
- PendingReadOp
-
Field Summary
FieldsFields inherited from class org.apache.bookkeeper.client.PendingReadOp.SingleLedgerEntryRequest
entryImplFields inherited from class org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
complete, eId, ensemble, firstError, numBookiesMissingEntry, rc, writeSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidlogErrorAndReattemptRead(int bookieIndex, BookieId host, String errMsg, int rc) Log error errMsg and reattempt read from host.(package private) BookieIdmaybeSendSpeculativeRead(BitSet heardFromHostsBitSet) Send to next replica speculatively, if required and possible.(package private) voidread()Execute the read request.Methods inherited from class org.apache.bookkeeper.client.PendingReadOp.SingleLedgerEntryRequest
close, completeMethods inherited from class org.apache.bookkeeper.client.ReadOpBase.LedgerEntryRequest
fail, getRc, isComplete, issueSpeculativeRequest, toString
-
Field Details
-
numPendings
int numPendings
-
-
Constructor Details
-
ParallelReadRequest
-
-
Method Details
-
read
void read()Description copied from class:ReadOpBase.LedgerEntryRequestExecute the read request.- Specified by:
readin classReadOpBase.LedgerEntryRequest
-
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
-
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:
heardFromHostsBitSet- the set of hosts that we already received responses.- Returns:
- host we sent to if we sent. null otherwise.
-