Class FileRegion

java.lang.Object
org.apache.hadoop.hdfs.server.common.FileRegion
All Implemented Interfaces:
BlockAlias

@Public @Unstable public class FileRegion extends Object implements BlockAlias
This class is used to represent provided blocks that are file regions, i.e., can be described using (path, offset, length).
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileRegion(long blockId, Path path, long offset, long length)
     
    FileRegion(long blockId, Path path, long offset, long length, long genStamp)
     
    FileRegion(long blockId, Path path, long offset, long length, long genStamp, byte[] nonce)
     
    FileRegion(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.apache.hadoop.hdfs.protocol.Block
     
    org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileRegion

      public FileRegion(long blockId, Path path, long offset, long length, long genStamp)
    • FileRegion

      public FileRegion(long blockId, Path path, long offset, long length, long genStamp, byte[] nonce)
    • FileRegion

      public FileRegion(long blockId, Path path, long offset, long length)
    • FileRegion

      public FileRegion(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)
  • Method Details

    • getBlock

      public org.apache.hadoop.hdfs.protocol.Block getBlock()
      Specified by:
      getBlock in interface BlockAlias
    • getProvidedStorageLocation

      public org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation getProvidedStorageLocation()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object