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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.commons.cli.OptionsBuild command-line options and descriptionsintgo(String inputFileName, String outputFileName, String processor, OfflineEditsViewer.Flags flags, OfflineEditsVisitor visitor) Process an edit log using the chosen processor or visitor.static voidmain() runs the offline edits viewer using ToolRunnerintMain entry point for ToolRunner (see ToolRunner docs)Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 processoutputFileName- The output file nameprocessor- If visitor is null, the processor to usevisitor- If non-null, the visitor to use.- Returns:
- 0 on success; error code otherwise
-
run
Main entry point for ToolRunner (see ToolRunner docs)- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Parameters:
argv- The parameters passed to this program.- Returns:
- 0 on success, non zero on error.
- Throws:
Exception
-
main
main() runs the offline edits viewer using ToolRunner- Parameters:
argv- Command line parameters.- Throws:
Exception
-