org.apache.hadoop.hdfs.server.namenode

## Class CheckpointFaultInjector

- java.lang.Object
- - org.apache.hadoop.hdfs.server.namenode.CheckpointFaultInjector

-     public class CheckpointFaultInjector
      extends Object

  Utility class to faciliate some fault injection tests for the checkpointing process.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CheckpointFaultInjector` | `instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CheckpointFaultInjector()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aboutToSendFile(File localfile)`
    `void` | `afterMD5Rename()`
    `void` | `afterSecondaryCallsRollEditLog()`
    `void` | `afterSecondaryUploadsNewImage()`
    `void` | `beforeEditsRename()`
    `void` | `beforeGetImageSetsHeaders()`
    `void` | `duringMerge()`
    `void` | `duringUploadInProgess()`
    `static CheckpointFaultInjector` | `getInstance()`
    `static void` | `set(CheckpointFaultInjector instance)`
    `boolean` | `shouldCorruptAByte(File localfile)`
    `boolean` | `shouldSendShortFile(File localfile)`

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

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

- - ### Field Detail

    - #### instance

          public static CheckpointFaultInjector instance

  - ### Constructor Detail

    - #### CheckpointFaultInjector

          public CheckpointFaultInjector()

  - ### Method Detail

    - #### getInstance

          public static CheckpointFaultInjector getInstance()

    - #### set

          public static void set(CheckpointFaultInjector instance)

    - #### beforeGetImageSetsHeaders

          public void beforeGetImageSetsHeaders()
                                         throws IOException

      Throws:
        `IOException`

    - #### afterSecondaryCallsRollEditLog

          public void afterSecondaryCallsRollEditLog()
                                              throws IOException

      Throws:
        `IOException`

    - #### duringMerge

          public void duringMerge()
                           throws IOException

      Throws:
        `IOException`

    - #### afterSecondaryUploadsNewImage

          public void afterSecondaryUploadsNewImage()
                                             throws IOException

      Throws:
        `IOException`

    - #### aboutToSendFile

          public void aboutToSendFile(File localfile)
                               throws IOException

      Throws:
        `IOException`

    - #### shouldSendShortFile

          public boolean shouldSendShortFile(File localfile)

    - #### shouldCorruptAByte

          public boolean shouldCorruptAByte(File localfile)

    - #### afterMD5Rename

          public void afterMD5Rename()
                              throws IOException

      Throws:
        `IOException`

    - #### beforeEditsRename

          public void beforeEditsRename()
                                 throws IOException

      Throws:
        `IOException`

    - #### duringUploadInProgess

          public void duringUploadInProgess()
                                     throws InterruptedException,
                                            IOException

      Throws:
        `InterruptedException`
        `IOException`

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