ReadWriteDiskValidator (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, class: ReadWriteDiskValidator

Package org.apache.hadoop.util

# Class ReadWriteDiskValidator

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

All Implemented Interfaces:
  `DiskValidator`

public class ReadWriteDiskValidator extends Object implements 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
  Description
  `static final String`
  `NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReadWriteDiskValidator()`

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### NAME

    public static final String NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ReadWriteDiskValidator

    public ReadWriteDiskValidator()

- ## Method Details

  - ### checkStatus

    public void checkStatus(File dir) throws DiskChecker.DiskErrorException
    Description copied from interface: `DiskValidator`
    Check the status of a file/dir.
    Specified by:
      `checkStatus` in interface `DiskValidator`
    Parameters:
      `dir` - a file/dir
    Throws:
      `DiskChecker.DiskErrorException` - if any disk error