use of com.twitter.distributedlog.bk.LedgerAllocatorDelegator in project distributedlog by twitter.
the class BKDistributedLogManager method createLedgerAllocator.
// Create Ledger Allocator
LedgerAllocator createLedgerAllocator(ZKLogMetadataForWriter logMetadata) throws IOException {
LedgerAllocator ledgerAllocatorDelegator;
if (!dynConf.getEnableLedgerAllocatorPool()) {
QuorumConfigProvider quorumConfigProvider = new DynamicQuorumConfigProvider(dynConf);
LedgerAllocator allocator = new SimpleLedgerAllocator(logMetadata.getAllocationPath(), logMetadata.getAllocationData(), quorumConfigProvider, writerZKC, writerBKC);
ledgerAllocatorDelegator = new LedgerAllocatorDelegator(allocator, true);
} else {
ledgerAllocatorDelegator = ledgerAllocator;
}
return ledgerAllocatorDelegator;
}
Aggregations