Description
HADOOP-8597 added support for reading avro data files from FsShell Text command. However, it does not work with files stored on HDFS. Here is the error message:
$hadoop fs -text hdfs://localhost:8020/test.avro -text: URI scheme is not "file" Usage: hadoop fs [generic options] -text [-ignoreCrc] <src> ...
The problem is because the File constructor complains not able to recognize hdfs:// scheme in during AvroFileInputStream initialization.
There is a unit TestTextCommand.java under hadoop-common project. However it only tested files in local file system. I created a similar one under hadoop-hdfs project using MiniDFSCluster. Please see attached maven unit test error message with full stack trace for more details.