@InterfaceAudience.Private @InterfaceStability.Unstable public class StatisticsEditsVisitor extends Object implements OfflineEditsVisitor
| Constructor and Description |
|---|
StatisticsEditsVisitor(OutputStream out)
Create a processor that writes to the file named and may or may not
also output to the screen, as specified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(Throwable error)
Close the visitor
|
Map<FSEditLogOpCodes,Long> |
getStatistics()
Get statistics
|
String |
getStatisticsString()
Get the statistics in string format, suitable for printing
|
void |
start(int version)
Start the visitor
|
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.
|
public StatisticsEditsVisitor(OutputStream out) throws IOException
filename - Name of file to write output totokenizer - Input tokenizerprintToScreen - Mirror output to screen?IOExceptionpublic void start(int version)
throws IOException
start in interface OfflineEditsVisitorversion - Edit log versionIOExceptionpublic void close(Throwable error) throws IOException
close in interface OfflineEditsVisitorerror - If the visitor was closed because of an
unrecoverable error in the input stream, this
is the exception.IOExceptionpublic void visitOp(FSEditLogOp op) throws IOException
OfflineEditsVisitorvisitOp in interface OfflineEditsVisitorIOExceptionpublic Map<FSEditLogOpCodes,Long> getStatistics()
public String getStatisticsString()
Copyright © 2013 Apache Software Foundation. All rights reserved.