ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1176

Remove dead code and basic cleanup in DataTree

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Tags:
      cleanup, cleancode

      Description

      • DataTree members scount, initialized and method listACLEquals are never used
      • transform if(!C) B else A to if(C) A else B (removes one indirection to follow for the brain)
      • remove unused imports and one annotation
      • add method getApproximateDataSize to DataNode (I work towards an immutable DataNode without public properties)
      • move assignments (lastPrefix = getMaxPrefixWithQuota(path)) out of if statements
      • combine nested if statements: if A if B then C => if A && B => C
      • make ACL maps private and add getAclSize() to hide implementation details of the ACLs.
      1. ZOOKEEPER-1176.patch
        67 kB
        Thomas Koch
      2. ZOOKEEPER-1176.patch
        13 kB
        Thomas Koch
      3. ZOOKEEPER-1176.patch
        13 kB
        Thomas Koch
      4. ZOOKEEPER-1176.patch
        13 kB
        Thomas Koch
      5. ZOOKEEPER-1176.patch
        13 kB
        Thomas Koch

        Activity

        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Thomas Koch made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Thomas Koch made changes -
        Attachment ZOOKEEPER-1176.patch [ 12494592 ]
        Thomas Koch made changes -
        Attachment ZOOKEEPER-1176.patch [ 12494587 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Fix Version/s 3.5.0 [ 12316644 ]
        Thomas Koch made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Thomas Koch made changes -
        Attachment ZOOKEEPER-1176.patch [ 12494417 ]
        Thomas Koch made changes -
        Attachment ZOOKEEPER-1176.patch [ 12494394 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Thomas Koch made changes -
        Description - DataTree members scount, initialized and method listACLEquals are never used
        - transform if(!C) B else A to if(C) A else B (removes one indirection to follow for the brain)
        - remove unused imports and one annotation
        - add method getApproximateDataSize to DataNode (I work towards an immutable DataNode without public properties)
        - move assignments (lastPrefix = getMaxPrefixWithQuota(path)) out of if statements
        - combine nested if statements: if A if B then C => if A && B => C

        - DataTree members scount, initialized and method listACLEquals are never used
        - transform if(!C) B else A to if(C) A else B (removes one indirection to follow for the brain)
        - remove unused imports and one annotation
        - add method getApproximateDataSize to DataNode (I work towards an immutable DataNode without public properties)
        - move assignments (lastPrefix = getMaxPrefixWithQuota(path)) out of if statements
        - combine nested if statements: if A if B then C => if A && B => C
        - make ACL maps private and add getAclSize() to hide implementation details of the ACLs.
        Thomas Koch made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Thomas Koch made changes -
        Assignee Thomas Koch [ thkoch ]
        Thomas Koch made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-1176.patch [ 12493793 ]
        Thomas Koch created issue -

          People

          • Assignee:
            Thomas Koch
            Reporter:
            Thomas Koch
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development