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

exists() not necessary before DFS.open

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment