org.apache.hadoop.hdfs.server.common

## Class FileRegion

- java.lang.Object
- - org.apache.hadoop.hdfs.server.common.FileRegion

- All Implemented Interfaces:
    BlockAlias

      @InterfaceAudience.Public
       @InterfaceStability.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 and Description
    `FileRegion(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)`
    `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)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### 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 Detail

    - #### 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`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.