OfflineEditsVisitor (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.tools.offlineEditsViewer, interface: OfflineEditsVisitor

Package org.apache.hadoop.hdfs.tools.offlineEditsViewer

# Interface OfflineEditsVisitor

All Known Implementing Classes:
  `BinaryEditsVisitor`, `StatisticsEditsVisitor`, `XmlEditsVisitor`

@Private @Unstable public interface OfflineEditsVisitor
An implementation of OfflineEditsVisitor can traverse the structure of an Hadoop edits log and respond to each of the structures within the file.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close(Throwable error)`
  Finish visiting the edits log structure.
  `void`
  `start(int version)`
  Begin visiting the edits log structure.
  `void`
  `visitOp(FSEditLogOp op)`
  Begin visiting an element that encloses another element, such as the beginning of the list of blocks that comprise a file.

- ## Method Details

  - ### start

    void start(int version) throws IOException
    Begin visiting the edits log structure. Opportunity to perform any initialization necessary for the implementing visitor.
    Parameters:
      `version` - Edit log version
    Throws:
      `IOException`

  - ### close

    void close(Throwable error) throws IOException
    Finish visiting the edits log structure. Opportunity to perform any clean up necessary for the implementing visitor.
    Parameters:
      `error` - If the visitor was closed because of an unrecoverable error in the input stream, this is the exception.
    Throws:
      `IOException`

  - ### visitOp

    void visitOp(FSEditLogOp op) throws IOException
    Begin visiting an element that encloses another element, such as the beginning of the list of blocks that comprise a file.
    Parameters:
      `op` - Token being visited
    Throws:
      `IOException`