Skip to main content

Module run

Module run 

Source
Expand description

This file contains code to find sorted runs in a set if ranged items and along with the best way to merge these items to satisfy the desired run count.

Structsยง

FileGroup
A group of files that are created by the same compaction task.
SortedRun
A set of files with non-overlapping time ranges.

Constantsยง

DEFAULT_MAX_OUTPUT_SIZE ๐Ÿ”’
Default max compaction output file size when not specified.

Traitsยง

Item
Trait for items to merge.
Ranged
Trait for any items with specific range (both boundaries are inclusive).

Functionsยง

find_overlapping_items
find_sorted_runs
Finds sorted runs in given items.
merge_primary_key_ranges ๐Ÿ”’
merge_seq_files
Finds the optimal set of adjacent files to merge based on a scoring system.
primary_key_ranges_overlap ๐Ÿ”’
reduce_runs
Finds a set of files with minimum penalty to merge that can reduce the total num of runs. The penalty of merging is defined as the size of all overlapping files between two runs.
sort_ranged_items ๐Ÿ”’