Class BlockfileCompactorFileCache
java.lang.Object
io.datarouter.bytes.blockfile.io.compact.BlockfileCompactorFileCache
Keeps track of files during a compaction.
Can be enhanced with different selection strategies for efficient compaction.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockfileCompactorFileCache(int targetNumFiles, boolean prune, ByteLength readBufferSize, int memoryFanIn, int streamingFanIn, List<BlockfileNameAndSize> files) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BlockfileNameAndSize file) booleanstatic intlevel(long fileSize) Effectively rounds up to an exact power of 2.intnumFiles()voidremove(BlockfileNameAndSize file)
-
Constructor Details
-
BlockfileCompactorFileCache
public BlockfileCompactorFileCache(int targetNumFiles, boolean prune, ByteLength readBufferSize, int memoryFanIn, int streamingFanIn, List<BlockfileNameAndSize> files)
-
-
Method Details
-
numFiles
public int numFiles() -
totalSize
-
add
-
remove
-
hasMoreToMerge
public boolean hasMoreToMerge() -
findNextMergePlan
-
level
public static int level(long fileSize) Effectively rounds up to an exact power of 2.
-