Class MappableBlockLoader
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.MappableBlockLoader
- Direct Known Subclasses:
MemoryMappableBlockLoader,PmemMappableBlockLoader
Maps block to DataNode cache region.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intfillBuffer(FileChannel channel, ByteBuffer buf) Reads bytes into a buffer until EOF or the buffer's limit is reached.protected voidverifyChecksum(long length, FileInputStream metaIn, FileChannel blockChannel, String blockFileName) Verifies the block's checksum.
-
Constructor Details
-
MappableBlockLoader
public MappableBlockLoader()
-
-
Method Details
-
verifyChecksum
protected void verifyChecksum(long length, FileInputStream metaIn, FileChannel blockChannel, String blockFileName) throws IOException Verifies the block's checksum. This is an I/O intensive operation.- Throws:
IOException
-
fillBuffer
Reads bytes into a buffer until EOF or the buffer's limit is reached.- Throws:
IOException
-