[jira] Created: (ZOOKEEPER-594) Adding documentation to zkpython to help out with the setup for finding libzookeeper_mt.so.2

2009-11-24 Thread Erik Holstad (JIRA)
Adding documentation to zkpython to help out with the setup for finding 
libzookeeper_mt.so.2


 Key: ZOOKEEPER-594
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-594
 Project: Zookeeper
  Issue Type: Improvement
  Components: contrib
 Environment: Have been tested on Fedora 9
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor


When setting up and using the zkpython binding, sometimes you encounter the 
problem that python cannot find the file libzookeeper_mt.so.2. This can be 
fixed in most cases by for example adding the line export 
LD_LIBRARY_PATH=/usr/local/lib/ to your .bashrc file. I some cases though, 
when for example running your python script from within a fcgi context and a 
lighttpd server it still isn't able to find the file.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-594) Adding documentation to zkpython to help out with the setup for finding libzookeeper_mt.so.2

2009-11-24 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-594:
---

Attachment: ZOOKEEPER-594.patch

 Adding documentation to zkpython to help out with the setup for finding 
 libzookeeper_mt.so.2
 

 Key: ZOOKEEPER-594
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-594
 Project: Zookeeper
  Issue Type: Improvement
  Components: contrib
 Environment: Have been tested on Fedora 9
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Attachments: ZOOKEEPER-594.patch


 When setting up and using the zkpython binding, sometimes you encounter the 
 problem that python cannot find the file libzookeeper_mt.so.2. This can be 
 fixed in most cases by for example adding the line export 
 LD_LIBRARY_PATH=/usr/local/lib/ to your .bashrc file. I some cases though, 
 when for example running your python script from within a fcgi context and a 
 lighttpd server it still isn't able to find the file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-594) Adding documentation to zkpython to help out with the setup for finding libzookeeper_mt.so.2

2009-11-24 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-594:
---

Attachment: ZOOKEEPER-594.patch

Changed the wording in README after comment from Henry. Also removed the output 
lines from setup.py, since I don't really think that this information belongs 
there.

 Adding documentation to zkpython to help out with the setup for finding 
 libzookeeper_mt.so.2
 

 Key: ZOOKEEPER-594
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-594
 Project: Zookeeper
  Issue Type: Improvement
  Components: contrib
 Environment: Have been tested on Fedora 9
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Attachments: ZOOKEEPER-594.patch, ZOOKEEPER-594.patch


 When setting up and using the zkpython binding, sometimes you encounter the 
 problem that python cannot find the file libzookeeper_mt.so.2. This can be 
 fixed in most cases by for example adding the line export 
 LD_LIBRARY_PATH=/usr/local/lib/ to your .bashrc file. I some cases though, 
 when for example running your python script from within a fcgi context and a 
 lighttpd server it still isn't able to find the file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-12 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12777286#action_12777286
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@Mahadev
I totally agree that it is hard to follow a patch when there is a lot of crap 
changes in there. This was not my intention but had to do with the settings
that I used, from the beginning and some un clearness on the website about 
intentations that has since been fixed. 

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

Fixed the findbug warning, hopefully, by moving the synchronization away from 
the node object into the different caller methods.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12776549#action_12776549
 ] 

Erik Holstad commented on ZOOKEEPER-472:


Not really sure what to do about the no test -1. It is kinda hard to include 
new test for something like this and make it portable in a good way. 
Since I'm not adding any new functionality, the old tests should be enough, or 
what is the general opinion on this matter?

Erik

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12776580#action_12776580
 ] 

Erik Holstad commented on ZOOKEEPER-472:


Sounds good to me.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

Fixed issues, so that patch applies to trunk

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: (was: zookeeper-472-v2.patch)

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12766595#action_12766595
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@ Patrik, sorry for not doing this yesterday, had some other stuff that I 
needed to take care of.  Yeah, that patch was created against an older branch, 
but I updated to trunk
in Eclipse and tested it before submitting it, but there seems to have been 
some issues with that.
This patch applied clean on trunk as of this morning using regular patch -p0

Erik

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

Fixed compile error.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12766626#action_12766626
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@ Mahadev, yeah that was my bad. Not sure why my environment didn't show that 
as an error. 

Erik

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

Fixed headers

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-16 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12766655#action_12766655
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@ Mahadev, no reason for it, just a part of the mess with me using another 
indention scheme for the original patch.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch, zookeeper-472.patch, 
 zookeeper-472.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Work stopped: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-14 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on ZOOKEEPER-472 stopped by Erik Holstad.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472-v2.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-14 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12765709#action_12765709
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@ Patrik , well good thing you cannot take me in the ear and sit me down :) 
Might want to change the instructions on 
http://wiki.apache.org/hadoop/ZooKeeper/HowToContribute though, to not make 
people confused? Remember taking a look there when I started and saw the code.

Erik

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472-v2.patch, zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Work started: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-10-12 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on ZOOKEEPER-472 started by Erik Holstad.

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-536) the initial size of the hashsets for the watcher is too large

2009-09-27 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12760092#action_12760092
 ] 

Erik Holstad commented on ZOOKEEPER-536:


I think it would be possible to take the same approach as I did in 
https://issues.apache.org/jira/browse/ZOOKEEPER-472,
to instantiate the hashmap, when the first watcher is set. For both issues I 
guess it might make sense to create a smaller 
map when actually instantiating too, maybe 8 or so.

Erik

 the initial size of the hashsets for the watcher is too large
 -

 Key: ZOOKEEPER-536
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-536
 Project: Zookeeper
  Issue Type: Improvement
Reporter: Benjamin Reed

 setting a watches on a lot of different nodes can be expensive if there is 
 only one watch set on each node. by default the hashset we use to track 
 watches has 16 entries and takes up about 160 bytes. we should probably make 
 the initial size much lower.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-09-11 Thread Erik Holstad (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Holstad updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

I decided to take a lesser approach and just do what this Jira originally said, 
so basically creating two new methods, addChild() and removeChild() and making 
the variable children in DataNode private. The children set in DataNode is not 
instantiated at node creation but instead the first time addChild() is being 
called.

No synchronization is done one the calls addChild and removeChild since it 
looks like most other calls are synchronized on the node itself. 
Not really sure why getChildren is synchronized though, since as far as I can 
see it all the uses of it are also synchronized on the node.

According to the docs it says that 2 spaces should be used instead of 4. Is 
that a miss in the docs or is that what is really being used?
I'm using 2 for this patch.



 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0

 Attachments: zookeeper-472.patch


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (ZOOKEEPER-525) Changing children SetString to Setbyte[] in DataNode

2009-09-11 Thread Erik Holstad (JIRA)
Changing children SetString to Setbyte[] in DataNode


 Key: ZOOKEEPER-525
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-525
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Reporter: Erik Holstad
Priority: Minor
 Fix For: 3.3.0


For every instance of string there is an overhead of 48B compared to using 
byte[], on a 64 bit system, that seems unnecessary.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (ZOOKEEPER-526) Change the access pattern in the DataNode from direct access to the use of getters and setters

2009-09-11 Thread Erik Holstad (JIRA)
Change the access pattern in the DataNode from direct access to the use of 
getters and setters
--

 Key: ZOOKEEPER-526
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-526
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Reporter: Erik Holstad
Priority: Minor
 Fix For: 3.3.0




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-09-10 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12753929#action_12753929
 ] 

Erik Holstad commented on ZOOKEEPER-472:


Did some more coding today and created 3 classes and 1 inteface:
Interface Node

Class EphemeralNode
Class PersistentNode
Class PersistentSortedNode

The problem is that a lot of the class variables from the old DataNode class 
are being used like node.data = {}, instead of getting and setting it, which 
leads to some weirdness
when the node is no longer a class, but an interface. So the way I see it we 
can take two approaches.
1. Having the nodes subclass and override methods from a base class or
2. Start using getters and setters for all variables in the nodes. 

Just want to check before I do anything more since this might turn out to be a 
quite big change of how the nodes are being used internally.

Erik


 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-09-10 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12754001#action_12754001
 ] 

Erik Holstad commented on ZOOKEEPER-472:


@Mahadev
Yes the Jira was originally about not instantiating the HashSet before any 
children where added to the node, so in that case there is only a small reason 
for not having the persistent and the ephemeral nodes the same. For the sorted 
node I'm just using a sortedSet instead of the hashset, so all the set methods 
are still valid to use.

Not really sure how many types of nodes there could be, but we have a use case 
for HBase where this new sorted node would be good.
And in the case of more nodes coming into play it might make sense to have an 
interface of a base class.

Sorry about not being clear.

Erik

 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-08-10 Thread Erik Holstad (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12741689#action_12741689
 ] 

Erik Holstad commented on ZOOKEEPER-472:


After the HBase meeting this weekend we might have a use case for a new node 
type which keeps the children sorted, so including that we would have 3 
different types of nodes, if this new node would be interesting for ZooKeeper 
in general. Tying that to this issue I came up with the following:
1. Make a Node interface that only have the following methods
copyStat(...)
deserialize(...)
serialize(...)
2. For the ephemeral nodes this would be it, they wouldn't have to have any 
notion about children.
3, For the regular nodes and the sorted ones would also have:
setChildren(...)
addChild(...)
getChildren(...)
where getChildren(...) could have different return types depending on the node.

4. For the nodes that can have children we also keep the structure 
uninstantiated until children are actually set or added to the parent. This 
part I have already done, jsut need to do some more testing on it.

Erik


 Making DataNode not instantiate a HashMap when the node is ephmeral
 ---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.1, 3.2.0
Reporter: Erik Holstad
Assignee: Erik Holstad
Priority: Minor
 Fix For: 3.3.0


 Looking at the code, there is an overhead of a HashSet object for that nodes 
 children, even though the node might be an ephmeral node and cannot have 
 children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-07-14 Thread Erik Holstad (JIRA)
Making DataNode not instantiate a HashMap when the node is ephmeral
---

 Key: ZOOKEEPER-472
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-472
 Project: Zookeeper
  Issue Type: Improvement
Reporter: Erik Holstad
Priority: Minor


Looking at the code, there is an overhead of a HashSet object for that nodes 
children, even though the node might be an ephmeral node and cannot have 
children.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.