FileRegion (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common, class: FileRegion

Package org.apache.hadoop.hdfs.server.common

# 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, org.apache.hadoop.fs.Path path, long offset, long length)`
  `FileRegion(long blockId, org.apache.hadoop.fs.Path path, long offset, long length, long genStamp)`
  `FileRegion(long blockId, org.apache.hadoop.fs.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`
  `equals(Object o)`
  `org.apache.hadoop.hdfs.protocol.Block`
  `getBlock()`
  `org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation`
  `getProvidedStorageLocation()`
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FileRegion

    public FileRegion(long blockId, org.apache.hadoop.fs.Path path, long offset, long length, long genStamp)

  - ### FileRegion

    public FileRegion(long blockId, org.apache.hadoop.fs.Path path, long offset, long length, long genStamp, byte[] nonce)

  - ### FileRegion

    public FileRegion(long blockId, org.apache.hadoop.fs.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`