BlockMissingException (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs, class: BlockMissingException

Package org.apache.hadoop.hdfs

# Class BlockMissingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.hadoop.hdfs.BlockMissingException

All Implemented Interfaces:
  `Serializable`

@Private @Evolving public class BlockMissingException extends IOException
This exception is thrown when a read encounters a block that has no locations associated with it.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BlockMissingException(String filename, String description, long offset)`
  An exception that indicates that file was corrupted.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFile()`
  Returns the name of the corrupted file.
  `long`
  `getOffset()`
  Returns the offset at which this file is corrupted

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

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BlockMissingException

    public BlockMissingException(String filename, String description, long offset)
    An exception that indicates that file was corrupted.
    Parameters:
      `filename` - name of corrupted file
      `description` - a description of the corruption details

- ## Method Details

  - ### getFile

    public String getFile()
    Returns the name of the corrupted file.
    Returns:
      name of corrupted file

  - ### getOffset

    public long getOffset()
    Returns the offset at which this file is corrupted
    Returns:
      offset of corrupted file