Class SmooshedFileMapper
- java.lang.Object
-
- org.apache.druid.java.util.common.io.smoosh.SmooshedFileMapper
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class SmooshedFileMapper extends Object implements Closeable
Class that works in conjunction with FileSmoosher. This class knows how to map in a set of files smooshed by the FileSmoosher.
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.Interner<String>
STRING_INTERNER
Interner for smoosh internal files, which includes all column names since every column has an internal file associated with it
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Set<String>
getInternalFilenames()
static SmooshedFileMapper
load(File baseDir)
ByteBuffer
mapFile(String name)
Returns a mapped buffer of the smooshed file with the given name.
-
-
-
Field Detail
-
STRING_INTERNER
public static final com.google.common.collect.Interner<String> STRING_INTERNER
Interner for smoosh internal files, which includes all column names since every column has an internal file associated with it
-
-
Method Detail
-
load
public static SmooshedFileMapper load(File baseDir) throws IOException
- Throws:
IOException
-
mapFile
public ByteBuffer mapFile(String name) throws IOException
Returns a mapped buffer of the smooshed file with the given name. Buffer's contents from 0 to capacity() are the whole mapped file contents, limit() is equal to capacity().- Throws:
IOException
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-