Class HsFileDataIndexImpl

    • Constructor Detail

      • HsFileDataIndexImpl

        public HsFileDataIndexImpl​(int numSubpartitions,
                                   Path indexFilePath,
                                   int regionGroupSizeInBytes,
                                   long numRetainedInMemoryRegionsMax)
    • Method Detail

      • getReadableRegion

        public Optional<HsFileDataIndex.ReadableRegion> getReadableRegion​(int subpartitionId,
                                                                          int bufferIndex,
                                                                          int consumingOffset)
        Description copied from interface: HsFileDataIndex
        Get a HsFileDataIndex.ReadableRegion for the given subpartition that starts with the given buffer index, if existed.

        Note: Depending on the implementation, this method does not guarantee to always return the longest possible readable region.

        Specified by:
        getReadableRegion in interface HsFileDataIndex
        Parameters:
        subpartitionId - that the readable region belongs to
        bufferIndex - that the readable region starts with
        consumingOffset - of the downstream
        Returns:
        a HsFileDataIndex.ReadableRegion for the given subpartition that starts with the given buffer index, if exist; otherwise, Optional.empty().
      • addBuffers

        public void addBuffers​(List<HsFileDataIndex.SpilledBuffer> spilledBuffers)
        Description copied from interface: HsFileDataIndex
        Add buffers to the index.

        Attention: this method only called by spilling thread.

        Specified by:
        addBuffers in interface HsFileDataIndex
        Parameters:
        spilledBuffers - to be added. The buffers in the list are expected in the same order as in the spilled file.
      • markBufferReleased

        public void markBufferReleased​(int subpartitionId,
                                       int bufferIndex)
        Description copied from interface: HsFileDataIndex
        Mark a buffer as RELEASED.
        Specified by:
        markBufferReleased in interface HsFileDataIndex
        Parameters:
        subpartitionId - that the buffer belongs to
        bufferIndex - of the buffer within the subpartition