Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1176

Remove dead code and basic cleanup in DataTree

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0
    • None
    • None
    • Reviewed
    • 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.

      Attachments

        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

          People

            thkoch Thomas Koch
            thkoch Thomas Koch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: