Unable to read avro file using avro tools

Pulled data from hive to hdfs using avro ,but unable to read avro file using hdfs://nn01.itversity.com:8020/user/tarunkumard/module_avro/EMPLOYEE/part-m-00000.avro>Employee.avsc

I see data being pulled from hive to hdfs using hdfs dfs -ls module_avro,but unable to browse using below ,any reason for that

hdfs://nn01.itversity.com:8020/user/tarunkumard/module_avro/EMPLOYEE/part-m-00000.avro>Employee.avsc

what you are doing here is basically redirecting the avro file to a schema file.

you need to use ‘avro-tools’ to apply any action on the avro files.

if you want to extract schema then use avro-tools getschema part-m-00000.avro and that would give you the schema instead of what you are trying to do above.
or avro-tools getschema part-m-00000.avro >employee.avsc

gave full absolute path still failed

[tarunkumard@gw01 ~]$ hdfs dfs -ls module_avro/EMPLOYEE
Found 2 items
-rw-r–r-- 3 tarunkumard hdfs 0 2017-02-13 02:30 module_avro/EMPLOYEE/_SUCCESS
-rw-r–r-- 3 tarunkumard hdfs 484 2017-02-13 02:30 module_avro/EMPLOYEE/part-m-00000.avro
[tarunkumard@gw01 ~]$ avro-tools getschema module_avro/EMPLOYEE/part-m-00000.avro
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread “main” java.io.FileNotFoundException: File module_avro/EMPLOYEE/part-m-00000.avro does not exist
at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:524)
at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:737)
at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:514)
at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
at org.apache.avro.mapred.FsInput.(FsInput.java:43)
at org.apache.avro.mapred.FsInput.(FsInput.java:38)
at org.apache.avro.tool.Util.openSeekableFromFS(Util.java:110)
at org.apache.avro.tool.DataFileGetSchemaTool.run(DataFileGetSchemaTool.java:47)
at org.apache.avro.tool.Main.run(Main.java:87)
at org.apache.avro.tool.Main.main(Main.java:76)

do this in your local not in hdfs path.

this cmd worked avro-tools getschema hdfs://nn01.itversity.com:8020/user/tarunkumard/module_avro/EMPLOYEE/part-m-00000.avro>Employee.avsc

thank you avinash for your time, appreciated