use of org.apache.distributedlog.bk.SimpleLedgerAllocator in project bookkeeper by apache.
the class BKLogSegmentEntryStore method createLedgerAllocator.
//
// Writers
//
LedgerAllocator createLedgerAllocator(LogMetadataForWriter logMetadata, DynamicDistributedLogConfiguration dynConf) throws IOException {
LedgerAllocator ledgerAllocatorDelegator;
if (null == allocator || !dynConf.getEnableLedgerAllocatorPool()) {
QuorumConfigProvider quorumConfigProvider = new DynamicQuorumConfigProvider(dynConf);
LedgerAllocator allocator = new SimpleLedgerAllocator(logMetadata.getAllocationPath(), logMetadata.getAllocationData(), quorumConfigProvider, zkc, bkc);
ledgerAllocatorDelegator = new LedgerAllocatorDelegator(allocator, true);
} else {
ledgerAllocatorDelegator = allocator;
}
return ledgerAllocatorDelegator;
}
Aggregations