java.lang.Object
org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.PmemMappedBlock
All Implemented Interfaces:
Closeable, AutoCloseable, MappableBlock

@Private @Unstable public class PmemMappedBlock extends Object implements MappableBlock
Represents an HDFS block that is mapped to persistent memory by DataNode with mapped byte buffer. PMDK is NOT involved in this implementation.
  • Method Details

    • getLength

      public long getLength()
      Description copied from interface: MappableBlock
      Get the number of bytes that have been cached.
      Specified by:
      getLength in interface MappableBlock
      Returns:
      the number of bytes that have been cached.
    • getAddress

      public long getAddress()
      Description copied from interface: MappableBlock
      Get cache address if applicable. Return -1 if not applicable.
      Specified by:
      getAddress in interface MappableBlock
    • getKey

      public org.apache.hadoop.hdfs.ExtendedBlockId getKey()
      Description copied from interface: MappableBlock
      Get cached block's ExtendedBlockId.
      Specified by:
      getKey in interface MappableBlock
      Returns:
      cached block's ExtendedBlockId..
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable