org.apache.hadoop.util

## Class ReadWriteDiskValidator

- java.lang.Object
- - org.apache.hadoop.util.ReadWriteDiskValidator

- All Implemented Interfaces:
    org.apache.hadoop.util.DiskValidator

      public class ReadWriteDiskValidator
      extends Object
      implements org.apache.hadoop.util.DiskValidator

  ReadWriteDiskValidator is the class to check a directory by to create a file, write some bytes into it, read back, and verify if they are identical. Read time and write time are recorded and put into an `ReadWriteDiskValidatorMetrics`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadWriteDiskValidator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkStatus(File dir)` Check the status of a file/dir.

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

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

- - ### Field Detail

    - #### NAME

          public static final String NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ReadWriteDiskValidator

          public ReadWriteDiskValidator()

  - ### Method Detail

    - #### checkStatus

          public void checkStatus(File dir)
                           throws DiskChecker.DiskErrorException

      Description copied from interface: `org.apache.hadoop.util.DiskValidator`
      Check the status of a file/dir.
      Specified by:
        `checkStatus` in interface `org.apache.hadoop.util.DiskValidator`
      Parameters:
        `dir` - a file/dir
      Throws:
        `DiskChecker.DiskErrorException` - if any disk error

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