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
        13 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
        67 kB
        Thomas Koch

        Activity

        No work has yet been logged on this 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