Interface SegmentFileMapper

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
SegmentFileMapperV10, SmooshedFileMapper

public interface SegmentFileMapper extends Closeable
Provides access to the internal files of a segment file. Segment files contain multiple internal files stored in the same physical file to more efficiently use file descriptors. At a higher level, columns are composed of one or more of these internal files, and coupled with metadata (also contained within the segment) can be turned into a QueryableIndex.
See Also:
  • Method Details

    • getInternalFilenames

      Set<String> getInternalFilenames()
      Returns the list of files contained within in the segment file which can be retrieved with mapFile(String)
    • mapFile

      @Nullable ByteBuffer mapFile(String name) throws IOException
      Returns a mapped ByteBuffer which of the contents of the internal file, or null if the file is not present in this segment. The file data is from 0 to Buffer.capacity(), Buffer.limit() is equal to the capacity.
      Throws:
      IOException
    • mapExternalFile

      @Nullable default ByteBuffer mapExternalFile(String filename, String name) throws IOException
      Loads a file from an 'external' segment container file, in the same directory as this SegmentFileMapper. Legacy implementations do not support this concept, and so just map these files directly, which allows column implementations to use these methods but also still work with older segment formats.
      Throws:
      IOException
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable