@InterfaceAudience.Private public class FileIOEngine extends PersistentIOEngine
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_DELIMITER |
filePaths| Constructor and Description |
|---|
FileIOEngine(long capacity,
boolean maintainPersistence,
String... filePaths) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPersistent()
File IO engine is always able to support persistent storage for the cache
|
Cacheable |
read(org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry be)
Transfers data from file to the given byte buffer
|
void |
shutdown()
Close the file
|
void |
sync()
Sync the data to file after writing
|
String |
toString() |
void |
write(ByteBuffer srcBuffer,
long offset)
Transfers data from the given byte buffer to file
|
void |
write(ByteBuff srcBuff,
long offset)
Transfers the data from the given MultiByteBuffer to IOEngine
|
calculateChecksum, verifyFileIntegrityclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitusesSharedMemorypublic static final String FILE_DELIMITER
public FileIOEngine(long capacity,
boolean maintainPersistence,
String... filePaths)
throws IOException
IOExceptionpublic boolean isPersistent()
public Cacheable read(org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry be) throws IOException
be - an BucketEntry which maintains an (offset, len, refCnt)Cacheable with block data inside.IOException - if any IO error happen.public void write(ByteBuffer srcBuffer, long offset) throws IOException
srcBuffer - the given byte buffer from which bytes are to be readoffset - The offset in the file where the first byte to be writtenIOExceptionpublic void sync()
throws IOException
IOExceptionpublic void shutdown()
public void write(ByteBuff srcBuff, long offset) throws IOException
IOEnginesrcBuff - the given MultiBytebufffers from which bytes are to be readoffset - the offset in the IO engine where the first byte to be writtenIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.