Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortedLedgerStorage supports multiple dirs #3493

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public class InterleavedLedgerStorage implements CompactableLedgerStorage, Entry
private OpStatsLogger getEntryStats;
private OpStatsLogger pageScanStats;
private Counter retryCounter;
private StateManager stateManager;

public InterleavedLedgerStorage() {
activeLedgers = new SnapshotMap<>();
Expand Down Expand Up @@ -161,7 +162,13 @@ void initializeWithEntryLogListener(ServerConfiguration conf,
}

@Override
public void setStateManager(StateManager stateManager) {}
public void setStateManager(StateManager stateManager) {
this.stateManager = stateManager;
}

public StateManager getStateManager() {
return stateManager;
}

@Override
public void setCheckpointSource(CheckpointSource checkpointSource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

package org.apache.bookkeeper.bookie;

import com.google.common.collect.Lists;
import com.google.common.util.concurrent.RateLimiter;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
Expand Down Expand Up @@ -216,9 +217,9 @@ interface LedgerDeletionListener {

ByteBuf getExplicitLac(long ledgerId) throws IOException, BookieException;

// for testability
default LedgerStorage getUnderlyingLedgerStorage() {
return this;
// for InterleavedLedgerStorage's testability
default List<InterleavedLedgerStorage> getUnderlyingInterleavedLedgerStorage() {
return Lists.newArrayList((InterleavedLedgerStorage) this);
}

/**
Expand Down
Loading