Class XmlEditsVisitor
java.lang.Object
org.apache.hadoop.hdfs.tools.offlineEditsViewer.XmlEditsVisitor
- All Implemented Interfaces:
OfflineEditsVisitor
An XmlEditsVisitor walks over an EditLog structure and writes out
an equivalent XML document that contains the EditLog's components.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a processor that writes to the file named and may or may not also output to the screen, as specified. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidFinish visitorvoidstart(int version) Start visitor (initialization)voidvisitOp(FSEditLogOp op) Begin visiting an element that encloses another element, such as the beginning of the list of blocks that comprise a file.
-
Constructor Details
-
XmlEditsVisitor
Create a processor that writes to the file named and may or may not also output to the screen, as specified.- Parameters:
out- output stream to write- Throws:
IOException- on any error
-
-
Method Details
-
start
Start visitor (initialization)- Specified by:
startin interfaceOfflineEditsVisitor- Parameters:
version- Edit log version- Throws:
IOException
-
addString
- Throws:
SAXException
-
close
Finish visitor- Specified by:
closein interfaceOfflineEditsVisitor- Parameters:
error- If the visitor was closed because of an unrecoverable error in the input stream, this is the exception.- Throws:
IOException
-
visitOp
Description copied from interface:OfflineEditsVisitorBegin visiting an element that encloses another element, such as the beginning of the list of blocks that comprise a file.- Specified by:
visitOpin interfaceOfflineEditsVisitor- Parameters:
op- Token being visited- Throws:
IOException
-