Package org.apache.avro.tool
Class SchemaNormalizationTool
java.lang.Object
org.apache.avro.tool.SchemaNormalizationTool
- All Implemented Interfaces:
Tool
Utility to convert an Avro @{Schema} to its canonical form.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Name of tool, to be used in listings.1-line description to be used in command listings.int
run
(InputStream stdin, PrintStream out, PrintStream err, List<String> args) Runs the tool with supplied arguments.
-
Constructor Details
-
SchemaNormalizationTool
public SchemaNormalizationTool()
-
-
Method Details
-
getName
Description copied from interface:Tool
Name of tool, to be used in listings. -
getShortDescription
Description copied from interface:Tool
1-line description to be used in command listings.- Specified by:
getShortDescription
in interfaceTool
-
run
public int run(InputStream stdin, PrintStream out, PrintStream err, List<String> args) throws Exception Description copied from interface:Tool
Runs the tool with supplied arguments. Input and output streams are customizable for easier testing.- Specified by:
run
in interfaceTool
- Parameters:
stdin
- Input stream to read data (typically System.in).out
- Output of tool (typically System.out).err
- Error stream (typically System.err).args
- Non-null list of arguments.- Returns:
- result code (0 for success)
- Throws:
Exception
- Just like main(), tools may throw Exception.
-