Package org.apache.bookkeeper.util
Class LedgerDirUtil
java.lang.Object
org.apache.bookkeeper.util.LedgerDirUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompactedLogIdsInDirectory(File directory) findLargestGap(List<Integer> currentIds) O(nlogn) algorithm to find largest contiguous gap between integers in a passed list.logIdsInDirectory(File directory)
-
Field Details
-
FILE_PATTERN
-
COMPACTED_FILE_PATTERN
-
-
Constructor Details
-
LedgerDirUtil
public LedgerDirUtil()
-
-
Method Details
-
logIdsInDirectory
-
compactedLogIdsInDirectory
-
findLargestGap
public static org.apache.commons.lang3.tuple.Pair<Integer,Integer> findLargestGap(List<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.
-