Package org.apache.druid.segment.file
Interface SegmentFileMapper
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
SegmentFileMapperV10,SmooshedFileMapper
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 Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the list of files contained within in the segment file which can be retrieved withmapFile(String)default ByteBuffermapExternalFile(String filename, String name) Loads a file from an 'external' segment container file, in the same directory as thisSegmentFileMapper.Returns a mappedByteBufferwhich of the contents of the internal file, or null if the file is not present in this segment.
-
Method Details
-
getInternalFilenames
Returns the list of files contained within in the segment file which can be retrieved withmapFile(String) -
mapFile
Returns a mappedByteBufferwhich of the contents of the internal file, or null if the file is not present in this segment. The file data is from 0 toBuffer.capacity(),Buffer.limit()is equal to the capacity.- Throws:
IOException
-
mapExternalFile
Loads a file from an 'external' segment container file, in the same directory as thisSegmentFileMapper. 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-