Class OfflineEditsViewer

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

@Private @Unstable public class OfflineEditsViewer extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
This class implements an offline edits viewer, tool that can be used to view edit logs.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.commons.cli.Options
    Build command-line options and descriptions
    int
    go(String inputFileName, String outputFileName, String processor, OfflineEditsViewer.Flags flags, OfflineEditsVisitor visitor)
    Process an edit log using the chosen processor or visitor.
    static void
    main(String[] argv)
    main() runs the offline edits viewer using ToolRunner
    int
    run(String[] argv)
    Main entry point for ToolRunner (see ToolRunner docs)

    Methods inherited from class org.apache.hadoop.conf.Configured

    getConf, setConf

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.hadoop.conf.Configurable

    getConf, setConf
  • Constructor Details

    • OfflineEditsViewer

      public OfflineEditsViewer()
  • Method Details

    • buildOptions

      public static org.apache.commons.cli.Options buildOptions()
      Build command-line options and descriptions
      Returns:
      command line options
    • go

      public int go(String inputFileName, String outputFileName, String processor, OfflineEditsViewer.Flags flags, OfflineEditsVisitor visitor)
      Process an edit log using the chosen processor or visitor.
      Parameters:
      inputFileName - The file to process
      outputFileName - The output file name
      processor - If visitor is null, the processor to use
      visitor - If non-null, the visitor to use.
      Returns:
      0 on success; error code otherwise
    • run

      public int run(String[] argv) throws Exception
      Main entry point for ToolRunner (see ToolRunner docs)
      Specified by:
      run in interface org.apache.hadoop.util.Tool
      Parameters:
      argv - The parameters passed to this program.
      Returns:
      0 on success, non zero on error.
      Throws:
      Exception
    • main

      public static void main(String[] argv) throws Exception
      main() runs the offline edits viewer using ToolRunner
      Parameters:
      argv - Command line parameters.
      Throws:
      Exception