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

exists() not necessary before DFS.open

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • None
    • None

    Description

      DistributedFileSystem.java:131
      public FSDataInputStream open(Path f, int bufferSize) throws IOException {
            if (!exists(f)) {
              throw new FileNotFoundException(f.toString());
            }
      
            return new DFSClient.DFSDataInputStream(dfs.open(getPath(f)), bufferSize);
       }
      

      exists(f) adds extra namenode interaction that is not really required. Open is a critical DFS call.

      Attachments

        1. HADOOP-1453-01.patch
          0.6 kB
          Raghu Angadi
        2. HADOOP-1453-02.patch
          1 kB
          Raghu Angadi
        3. HADOOP-1453-02.patch
          0.6 kB
          Raghu Angadi

        Activity

          People

            rangadi Raghu Angadi
            rangadi Raghu Angadi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: