Class KvFileCompactor

java.lang.Object
io.datarouter.bytes.kvfile.compact.KvFileCompactor

public class KvFileCompactor extends Object
For looping over a directory of KvFiles and merging N files at a time until only targetNumFiles remain. We gather the list of files only once, then track the remaining files in memory. Files added to the directory after processing starts are ignored, otherwise it could run forever. Currently merges smallest N files in a loop until targetNumFiles is met.