StevenLuMT commented on code in PR #3493:
URL: https://github.com/apache/bookkeeper/pull/3493#discussion_r973928734
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java:
##########
@@ -333,63 +381,84 @@ public void onRotateEntryLog() {
// flushed to the entry log file.
}
- BookieStateManager getStateManager(){
- return (BookieStateManager) stateManager;
- }
-
- public DefaultEntryLogger getEntryLogger() {
- return interleavedLedgerStorage.getEntryLogger();
+ public List<DefaultEntryLogger> getEntryLogger() {
+ List<DefaultEntryLogger> listIt = new ArrayList<>(numberOfDirs);
+ for (InterleavedLedgerStorage ls : interleavedLedgerStorageList) {
+ listIt.add(ls.getEntryLogger());
+ }
+ return listIt;
}
@Override
public Iterable<Long> getActiveLedgersInRange(long firstLedgerId, long
lastLedgerId) throws IOException {
- return interleavedLedgerStorage.getActiveLedgersInRange(firstLedgerId,
lastLedgerId);
+ List<Iterable<Long>> listIt = new ArrayList<>(numberOfDirs);
+ for (InterleavedLedgerStorage ls : interleavedLedgerStorageList) {
+ listIt.add(ls.getActiveLedgersInRange(firstLedgerId,
lastLedgerId));
+ }
+ return Iterables.concat(listIt);
}
@Override
public void updateEntriesLocations(Iterable<EntryLocation> locations)
throws IOException {
- interleavedLedgerStorage.updateEntriesLocations(locations);
+ for (InterleavedLedgerStorage s : interleavedLedgerStorageList) {
+ s.updateEntriesLocations(locations);
+ }
}
@Override
public void flushEntriesLocationsIndex() throws IOException {
- interleavedLedgerStorage.flushEntriesLocationsIndex();
+ for (InterleavedLedgerStorage s : interleavedLedgerStorageList) {
+ s.flushEntriesLocationsIndex();
+ }
}
@Override
public LedgerStorage getUnderlyingLedgerStorage() {
- return interleavedLedgerStorage;
+ return interleavedLedgerStorageList.get(0);
Review Comment:
finished:
this is mistake,I have updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]