Class FileDataIndexSpilledRegionManagerImpl<T extends FileDataIndexRegionHelper.Region>

  • All Implemented Interfaces:
    AutoCloseable, FileDataIndexSpilledRegionManager<T>

    public class FileDataIndexSpilledRegionManagerImpl<T extends FileDataIndexRegionHelper.Region>
    extends Object
    implements FileDataIndexSpilledRegionManager<T>
    Default implementation of FileDataIndexSpilledRegionManager. This manager will handle and spill regions in the following way:
    • All regions will be written to the same file, namely index file.
    • Multiple regions belonging to the same subpartition form a region group.
    • The regions in the same region group have no special relationship, but are only related to the order in which they are spilled.
    • Each region group is independent. Even if the previous region group is not full, the next region group can still be allocated.
    • If a region has been written to the index file already, spill it again will overwrite the previous region.
    • The very large region will monopolize a single region group.

    The relationships between index file and region group are shown below.

    
             - - - - - - - - - Index File - - — - - - - - - - - -
            |                                                     |
            | - - — -RegionGroup1 - -   - - RegionGroup2- - - -   |
            ||SP1 R1||SP1 R2| Free | |SP2 R3| SP2 R1| SP2 R2 |  |
            | - - - - - - - - - - - -   - - - - - - - - - - - -   |
            |                                                     |
            | - - - - - - - -RegionGroup3 - - - - -               |
            ||              Big Region             |              |
            | - - - - - - - - - - - - - - - - - - -               |
             - - - - - - - - - - - - - - - - - - - - - -- - - - -