@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?IOException
public void start(int version) throws IOException
start
in interface OfflineEditsVisitor
version
- Edit log versionIOException
public void close(Throwable error) throws IOException
close
in interface OfflineEditsVisitor
error
- If the visitor was closed because of an
unrecoverable error in the input stream, this
is the exception.IOException
public void visitOp(FSEditLogOp op) throws IOException
OfflineEditsVisitor
visitOp
in interface OfflineEditsVisitor
IOException
public Map<FSEditLogOpCodes,Long> getStatistics()
public String getStatisticsString()
Copyright © 2013 Apache Software Foundation. All rights reserved.