Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-335

improve singleton handling in DataNode

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      when a DataNode is constructed, it saves its identity to a static field:

      datanodeObject=this;

      1. there's no check on what if this is already set
      2. when the datanode terminates, it may want to set this to null

        Activity

        Hide
        Allen Wittenauer added a comment -

        I'm going to close this as stale.

        Show
        Allen Wittenauer added a comment - I'm going to close this as stale.
        Hide
        Steve Loughran added a comment -

        in SVN_HEAD, The FileChecksumServlets also assume that getDataNode() returns their datanode; that is information that should be passed to the servlet as a parameter when setting up the servlet context.

        Show
        Steve Loughran added a comment - in SVN_HEAD, The FileChecksumServlets also assume that getDataNode() returns their datanode; that is information that should be passed to the servlet as a parameter when setting up the servlet context.
        Hide
        Owen O'Malley added a comment -

        This should just be removed. The data nodes are not singletons. In particular, it is violated by the unit tests.

        Show
        Owen O'Malley added a comment - This should just be removed. The data nodes are not singletons. In particular, it is violated by the unit tests.
        Hide
        Steve Loughran added a comment -

        there are a couple of places in the code that assume that Datanode.getDatanode() returns non-null, both associated with dereferencing the upgrade manager.

        Show
        Steve Loughran added a comment - there are a couple of places in the code that assume that Datanode.getDatanode() returns non-null, both associated with dereferencing the upgrade manager.

          People

          • Assignee:
            Unassigned
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development