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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      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-yahoo2.patch
          3 kB
          Hairong Kuang
        3. optimizeCat-yahoo1.patch
          2 kB
          Hairong Kuang
        4. optimizeCat-yahoo.patch
          0.7 kB
          Hairong Kuang
        5. optimizeCat.patch
          0.6 kB
          Hairong Kuang

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: