Last active
May 26, 2021 18:18
-
-
Save yashk/7566679 to your computer and use it in GitHub Desktop.
avro command line tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :- http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/ | |
download tools jar - http://mirror.catn.com/pub/apache/avro/avro-1.7.5/java/avro-tools-1.7.5.jar | |
add following to ~/.bashrc | |
alias avro='java -jar /home/yash/software/avro/avro-tools-1.7.5.jar' | |
now use just as avro command | |
yash::ubuntu { 04:36:20 }-> avro | |
Version 1.7.5 of Apache Avro | |
Copyright 2010 The Apache Software Foundation | |
This product includes software developed at | |
The Apache Software Foundation (http://www.apache.org/). | |
C JSON parsing provided by Jansson and | |
written by Petri Lehtinen. The original software is | |
available from http://www.digip.org/jansson/. | |
---------------- | |
Available tools: | |
cat extracts samples from files | |
compile Generates Java code for the given schema. | |
concat Concatenates avro files without re-compressing. | |
fragtojson Renders a binary-encoded Avro datum as JSON. | |
fromjson Reads JSON records and writes an Avro data file. | |
fromtext Imports a text file into an avro data file. | |
getmeta Prints out the metadata of an Avro data file. | |
getschema Prints out schema of an Avro data file. | |
idl Generates a JSON schema from an Avro IDL file | |
idl2schemata Extract JSON schemata of the types from an Avro IDL file | |
induce Induce schema/protocol from Java class/interface via reflection. | |
jsontofrag Renders a JSON-encoded Avro datum as binary. | |
random Creates a file with randomly generated instances of a schema. | |
recodec Alters the codec of a data file. | |
rpcprotocol Output the protocol of a RPC service | |
rpcreceive Opens an RPC Server and listens for one message. | |
rpcsend Sends a single RPC message. | |
tether Run a tethered mapreduce job. | |
tojson Dumps an Avro data file as JSON, one record per line. | |
totext Converts an Avro data file to a text file. | |
totrevni Converts an Avro data file to a Trevni file. | |
trevni_meta Dumps a Trevni file's metadata as JSON. | |
trevni_random Create a Trevni file filled with random instances of a schema. | |
trevni_tojson Dumps a Trevni file as JSON. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment