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

FsShell#cat should avoid calling unecessary getFileStatus before opening a file to read

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.21.0
    • fs
    • None
    • Incompatible change, Reviewed

    Description

      Since FileSystem#open throws a FileNotFoundException when the file to be read does not exist, there is no need to check if the file is a directory or not before open. In case of HDFS, this could reduce one getFileInfo RPC to NameNode.

      Attachments

        1. optimizeCat.patch
          0.6 kB
          Hairong Kuang
        2. optimizeCat.patch
          0.6 kB
          Hairong Kuang
        3. optimizeCat-yahoo.patch
          0.7 kB
          Hairong Kuang
        4. optimizeCat-yahoo1.patch
          2 kB
          Hairong Kuang
        5. optimizeCat-yahoo2.patch
          3 kB
          Hairong Kuang

        Issue Links

          Activity

            People

              hairong Hairong Kuang
              hairong Hairong Kuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: