Interface FileDataIndexSpilledRegionManager<T extends FileDataIndexRegionHelper.Region>

    • Method Detail

      • appendOrOverwriteRegion

        void appendOrOverwriteRegion​(int subpartition,
                                     T region)
                              throws IOException
        Write this region to index file. If target region already spilled, overwrite it.
        Parameters:
        subpartition - the subpartition id of this region.
        region - the region to be spilled to index file.
        Throws:
        IOException
      • findRegion

        long findRegion​(int subpartition,
                        int bufferIndex,
                        boolean loadToCache)
        Find the region contains target bufferIndex and belong to target subpartition.
        Parameters:
        subpartition - the subpartition id that target region belong to.
        bufferIndex - the buffer index that target region contains.
        loadToCache - whether to load the found region into the cache.
        Returns:
        if target region can be founded, return it's offset in index file. Otherwise, return -1.