You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Thomas Koch (JIRA)" <ji...@apache.org> on 2011/09/09 17:45:09 UTC

[jira] [Created] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Remove dead code and basic cleanup in DataTree
----------------------------------------------

                 Key: ZOOKEEPER-1176
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
             Project: ZooKeeper
          Issue Type: Task
            Reporter: Thomas Koch


- 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



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105217#comment-13105217 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------



bq.  On 2011-09-14 18:34:18, Patrick Hunt wrote:
bq.  > src/java/main/org/apache/zookeeper/server/DataTree.java, line 160
bq.  > <https://reviews.apache.org/r/1772/diff/3/?file=40496#file40496line160>
bq.  >
bq.  >     while you're here, add javadoc?

I'm not ready yet with the DataTree. JavaDocs that I'd add now would get obsolete by the next patch.


bq.  On 2011-09-14 18:34:18, Patrick Hunt wrote:
bq.  > src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java, line 265
bq.  > <https://reviews.apache.org/r/1772/diff/3/?file=40498#file40498line265>
bq.  >
bq.  >     why is this dropped? (I didn't see it noted in the jira)

The setDataTreeInit method has been removed because it only did set the DataTree.initialized property which was never ever read again.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/#review1896
-----------------------------------------------------------


On 2011-09-15 08:31:34, Thomas Koch wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1772/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-15 08:31:34)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1176.
bq.      https://issues.apache.org/jira/browse/ZOOKEEPER-1176
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/java/main/org/apache/zookeeper/server/DataNode.java d839a74 
bq.    src/java/main/org/apache/zookeeper/server/DataTree.java 27338d1 
bq.    src/java/main/org/apache/zookeeper/server/ZKDatabase.java 6bad5fc 
bq.    src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 2d9b104 
bq.  
bq.  Diff: https://reviews.apache.org/r/1772/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104399#comment-13104399 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

(Updated 2011-09-14 10:12:15.541246)


Review request for zookeeper.


Summary
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    Attachment: ZOOKEEPER-1176.patch

updated patch to new trunk

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101304#comment-13101304 ] 

Hadoop QA commented on ZOOKEEPER-1176:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12493793/ZOOKEEPER-1176.patch
  against trunk revision 1166970.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/520//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/520//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/520//console

This message is automatically generated.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104978#comment-13104978 ] 

Hadoop QA commented on ZOOKEEPER-1176:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12494417/ZOOKEEPER-1176.patch
  against trunk revision 1170886.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/542//console

This message is automatically generated.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101292#comment-13101292 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

Review request for zookeeper.


Summary
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch
>
>
> - 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104319#comment-13104319 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

(Updated 2011-09-14 07:23:57.897945)


Review request for zookeeper.


Summary
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    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.


  was:
- 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




> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105244#comment-13105244 ] 

Hadoop QA commented on ZOOKEEPER-1176:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12494592/ZOOKEEPER-1176.patch
  against trunk revision 1170886.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 6 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/545//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/545//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/545//console

This message is automatically generated.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104545#comment-13104545 ] 

Hadoop QA commented on ZOOKEEPER-1176:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12494417/ZOOKEEPER-1176.patch
  against trunk revision 1170458.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/534//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/534//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/534//console

This message is automatically generated.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105206#comment-13105206 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

(Updated 2011-09-15 08:31:34.680636)


Review request for zookeeper.


Summary
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    Attachment: ZOOKEEPER-1176.patch

found that DataTree.clean() is never called, so removed the method.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    Attachment: ZOOKEEPER-1176.patch

missed a compiler error in the last patch.

Additionally fixed that two methods returned implementation types instead of Interfaces. (HashSet vs Set, LinkedList vs List) - This required subsequent changes in the calling classes that expected the implementation types but used only the Interfaces.

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-1176:
------------------------------------

    Fix Version/s: 3.5.0

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    Attachment: ZOOKEEPER-1176.patch

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch
>
>
> - 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch reassigned ZOOKEEPER-1176:
--------------------------------------

    Assignee: Thomas Koch

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch
>
>
> - 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Thomas Koch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Koch updated ZOOKEEPER-1176:
-----------------------------------

    Attachment: ZOOKEEPER-1176.patch

added a "synchronized" to org.apache.zookeeper.server.DataNode.getApproximateDataSize()

> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107086#comment-13107086 ] 

Hudson commented on ZOOKEEPER-1176:
-----------------------------------

Integrated in ZooKeeper-trunk #1306 (See [https://builds.apache.org/job/ZooKeeper-trunk/1306/])
    ZOOKEEPER-1176. Remove dead code and basic cleanup in DataTree (Thomas Koch via phunt)

phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1171879
Files : 
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataNode.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTree.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZKDatabase.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/RestoreCommittedLogTest.java


> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104941#comment-13104941 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

(Updated 2011-09-14 22:16:44.740700)


Review request for zookeeper.


Summary (updated)
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105230#comment-13105230 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/
-----------------------------------------------------------

(Updated 2011-09-15 09:06:50.251249)


Review request for zookeeper.


Summary
-------



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1176) Remove dead code and basic cleanup in DataTree

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104763#comment-13104763 ] 

jiraposter@reviews.apache.org commented on ZOOKEEPER-1176:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1772/#review1896
-----------------------------------------------------------


Looks good to me with just a couple questions:


src/java/main/org/apache/zookeeper/server/DataTree.java
<https://reviews.apache.org/r/1772/#comment4377>

    while you're here, add javadoc?



src/java/main/org/apache/zookeeper/server/DataTree.java
<https://reviews.apache.org/r/1772/#comment4378>

    javadoc?



src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
<https://reviews.apache.org/r/1772/#comment4379>

    why is this dropped? (I didn't see it noted in the jira)


- Patrick


On 2011-09-14 10:12:15, Thomas Koch wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1772/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 10:12:15)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1176.
bq.      https://issues.apache.org/jira/browse/ZOOKEEPER-1176
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/java/main/org/apache/zookeeper/server/DataNode.java 9498204 
bq.    src/java/main/org/apache/zookeeper/server/DataTree.java 3987c54 
bq.    src/java/main/org/apache/zookeeper/server/ZKDatabase.java 6bad5fc 
bq.    src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 2946030 
bq.  
bq.  Diff: https://reviews.apache.org/r/1772/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Remove dead code and basic cleanup in DataTree
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-1176
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1176
>             Project: ZooKeeper
>          Issue Type: Task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch, ZOOKEEPER-1176.patch
>
>
> - 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira