public boolean couldHaveKrf() { return getParent().couldHaveKrf(); }
public boolean isCompactionPossible() { return getParent().isCompactionPossible(); } }
public void crfDelete(long oplogId) { getParent().getDiskInitFile().crfDelete(oplogId); }
public void crfCreate(long oplogId) { getParent().getDiskInitFile().crfCreate(oplogId); }
public void drfCreate(long oplogId) { getParent().getDiskInitFile().drfCreate(oplogId); }
public void drfDelete(long oplogId) { getParent().getDiskInitFile().drfDelete(oplogId); }
@Before public void setup() { when(parent.getParent()).thenReturn(mock(DiskStoreImpl.class)); oplog = spy(new Oplog(oplogId, parent)); doReturn(true).when(oplog).needsCompaction(); doReturn(true).when(oplog).calledByCompactorThread(); }
/** * This constructor will get invoked only in case of persistent region when it is recovering an * oplog. */ Oplog(long oplogId, PersistentOplogSet parent) { // @todo have the crf and drf use different directories. if (oplogId > DiskId.MAX_OPLOG_ID) { throw new IllegalStateException( "Too many oplogs. The oplog id can not exceed " + DiskId.MAX_OPLOG_ID); } this.isRecovering = true; this.oplogId = oplogId; this.parent = parent.getParent(); this.oplogSet = parent; this.opState = new OpState(); this.maxOplogSize = getParent().getMaxOplogSizeInBytes(); setMaxCrfDrfSize(); this.stats = getParent().getStats(); this.compactOplogs = getParent().getAutoCompact(); this.closed = true; this.crf.RAFClosed = true; this.deleted.set(true); this.haveRecoveredCrf = false; this.haveRecoveredDrf = false; }
this.parent = parent.getParent(); this.dirHolder = dirHolder;