Package org.apache.bookkeeper.util
Class LedgerDirUtil
- java.lang.Object
- 
- org.apache.bookkeeper.util.LedgerDirUtil
 
- 
 public class LedgerDirUtil extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.regex.PatternCOMPACTED_FILE_PATTERNstatic java.util.regex.PatternFILE_PATTERN
 - 
Constructor SummaryConstructors Constructor Description LedgerDirUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.Integer>compactedLogIdsInDirectory(java.io.File directory)static org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer>findLargestGap(java.util.List<java.lang.Integer> currentIds)O(nlogn) algorithm to find largest contiguous gap between integers in a passed list.static java.util.List<java.lang.Integer>logIdsInDirectory(java.io.File directory)
 
- 
- 
- 
Method Detail- 
logIdsInDirectorypublic static java.util.List<java.lang.Integer> logIdsInDirectory(java.io.File directory) 
 - 
compactedLogIdsInDirectorypublic static java.util.List<java.lang.Integer> compactedLogIdsInDirectory(java.io.File directory) 
 - 
findLargestGappublic static org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer> findLargestGap(java.util.List<java.lang.Integer> currentIds) O(nlogn) algorithm to find largest contiguous gap between integers in a passed list. n should be relatively small. Entry logs should be about 1GB in size, so even if the node stores a PB, there should be only 1000000 entry logs.
 
- 
 
-