Class BlockfileRowCollator
java.lang.Object
io.datarouter.bytes.blockfile.row.BlockfileRowCollator
Collate BlockfileRows using only the binary data, not requiring the objects to be decoded.
Facilitates sorting much more data than fits in memory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAssumes non-null entries.static classAssumes non-null entries.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.datarouter.scanner.Scanner<BlockfileRow> keepAll(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Fastest option Merge entries keeping all versions and ops, including duplicates.static io.datarouter.scanner.Scanner<BlockfileRow> pruneAll(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Merge entries keeping the latest version.static io.datarouter.scanner.Scanner<BlockfileRow> pruneVersions(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Merge entries keeping the latest version.
-
Constructor Details
-
BlockfileRowCollator
public BlockfileRowCollator()
-
-
Method Details
-
keepAll
public static io.datarouter.scanner.Scanner<BlockfileRow> keepAll(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Fastest option Merge entries keeping all versions and ops, including duplicates. Assumes input is sorted by key+version+op. -
pruneVersions
public static io.datarouter.scanner.Scanner<BlockfileRow> pruneVersions(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Merge entries keeping the latest version. Keeps deletes. Assumes input is sorted by key+version+op. If multiple entries have same latest version then selection is undefined. -
pruneAll
public static io.datarouter.scanner.Scanner<BlockfileRow> pruneAll(List<io.datarouter.scanner.Scanner<BlockfileRow>> readers) Merge entries keeping the latest version. If lastest version is a DELETE then it's omitted. Assumes input is sorted by key+version. If multiple entries have same latest version then selection is undefined.
-