Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9740

FsShell's Text command does not read avro data files stored on HDFS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.5-alpha
    • 2.6.0
    • fs
    • Reviewed

    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.

      Attachments

        1. HADOOP-9740.patch
          11 kB
          Allan Yan
        2. HADOOP-9740.patch
          11 kB
          Allan Yan
        3. maven_unit_test_error.log
          4 kB
          Allan Yan

        Activity

          People

            allanyan Allan Yan
            allanyan Allan Yan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: