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

Is FSNamesystem.fsNamesystemObject unique?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.15.1
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      FSNamesystem is unique in almost all cases but it is not universally true. So we should either remove the static variable FSNamesystem.fsNamesystemObject or make it final (so that it cannot be overwritten).

      When I am working on HADOOP-1298, I use the convenient static method FSNamesystem.getFSNamesystem() to get "the" FSNamesystem object. However, it keeps failing on TestCheckpoint. Why? It is because TestCheckpoint uses NameNode and SecondaryNameNode. Both of them are creating FSNamesystem. So FSNamesystem.fsNamesystemObject does not remain constant. The kind of bug is hard to be detected.

        Attachments

        1. unStatic.patch
          25 kB
          Konstantin Shvachko

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                shv Konstantin Shvachko
                Reporter:
                szetszwo Tsz-wo Sze
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: