Class SharedMemoryMmapIOEngine
java.lang.Object
org.apache.hadoop.hbase.io.hfile.bucket.PersistentIOEngine
org.apache.hadoop.hbase.io.hfile.bucket.FileMmapIOEngine
org.apache.hadoop.hbase.io.hfile.bucket.SharedMemoryMmapIOEngine
- All Implemented Interfaces:
IOEngine
IO engine that stores data in pmem devices such as DCPMM. This engine also mmaps the file from
the given path. But note that this path has to be a path on the pmem device so that when mmapped
the file's address is mapped to the Pmem's address space and not in the DRAM. Since this address
space is exclusive for the Pmem device there is no swapping out of the mmapped contents that
generally happens when DRAM's free space is not enough to hold the specified file's mmapped
contents. This gives us the option of using the
MemoryType#SHARED
type when serving the
data from this pmem address space. We need not copy the blocks to the onheap space as we need to
do for the case of ExclusiveMemoryMmapIOEngine
.-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.hfile.bucket.FileMmapIOEngine
bufferArray, LOG, path, size
Fields inherited from class org.apache.hadoop.hbase.io.hfile.bucket.PersistentIOEngine
filePaths
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(BucketEntry be) Transfers data from IOEngine to a Cacheable object.boolean
IOEngine uses shared memory means, when reading Cacheable from it, those refers to the same memory area as used by the Engine for caching it.Methods inherited from class org.apache.hadoop.hbase.io.hfile.bucket.FileMmapIOEngine
isPersistent, shutdown, sync, toString, write, write
Methods inherited from class org.apache.hadoop.hbase.io.hfile.bucket.PersistentIOEngine
calculateChecksum, verifyFileIntegrity
-
Constructor Details
-
SharedMemoryMmapIOEngine
- Throws:
IOException
-
-
Method Details
-
read
Description copied from interface:IOEngine
Transfers data from IOEngine to a Cacheable object.- Specified by:
read
in interfaceIOEngine
- Specified by:
read
in classFileMmapIOEngine
- Parameters:
be
- maintains an (offset,len,refCnt) inside.- Returns:
- Cacheable which will wrap the NIO ByteBuffers from IOEngine.
- Throws:
IOException
- when any IO error happen