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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      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

            People

            • Assignee:
              mitdesai Mit Desai
              Reporter:
              mitdesai Mit Desai
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: