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

Package org.apache.hadoop.hdfs.server.blockmanagement

# Class BlockManagerFaultInjector

java.lang.Object
org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerFaultInjector

public class BlockManagerFaultInjector extends Object
Used to inject certain faults for testing.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static BlockManagerFaultInjector`
  `instance`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BlockManagerFaultInjector()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static BlockManagerFaultInjector`
  `getInstance()`
  `void`
  `incomingBlockReportRpc(org.apache.hadoop.hdfs.protocol.DatanodeID nodeID, BlockReportContext context)`
  `void`
  `mockAnException()`
  `void`
  `removeBlockReportLease(DatanodeDescriptor node, long leaseId)`
  `void`
  `requestBlockReportLease(DatanodeDescriptor node, long leaseId)`

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

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

- ## Field Details

  - ### instance

    @VisibleForTesting public static BlockManagerFaultInjector instance

- ## Constructor Details

  - ### BlockManagerFaultInjector

    public BlockManagerFaultInjector()

- ## Method Details

  - ### getInstance

    @VisibleForTesting public static BlockManagerFaultInjector getInstance()

  - ### incomingBlockReportRpc

    @VisibleForTesting public void incomingBlockReportRpc(org.apache.hadoop.hdfs.protocol.DatanodeID nodeID, BlockReportContext context) throws IOException
    Throws:
      `IOException`

  - ### requestBlockReportLease

    @VisibleForTesting public void requestBlockReportLease(DatanodeDescriptor node, long leaseId)

  - ### removeBlockReportLease

    @VisibleForTesting public void removeBlockReportLease(DatanodeDescriptor node, long leaseId)

  - ### mockAnException

    @VisibleForTesting public void mockAnException()