Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6755

There is an unnecessary sleep in the code path where DFSOutputStream#close gives up its attempt to contact the namenode

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.0
    • None
    • None

    Description

      DFSOutputStream#close has a loop where it tries to contact the NameNode, to call complete on the file which is open-for-write. This loop includes a sleep which increases exponentially (exponential backoff). It makes sense to sleep before re-contacting the NameNode, but the code also sleeps even in the case where it has already decided to give up and throw an exception back to the user. It should not sleep after it has already decided to give up, since there's no point.

      Attachments

        1. HDFS-6755.patch
          1.0 kB
          Mit Desai

        Activity

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

          People

            mitdesai Mit Desai
            mitdesai Mit Desai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment