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

2009-11-12 Thread Mahadev konar (JIRA)

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

Mahadev konar updated ZOOKEEPER-472:


  Resolution: Fixed
Hadoop Flags: [Reviewed]
  Status: Resolved  (was: Patch Available)

I just committed this. thanks 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] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

Status: Open  (was: Patch Available)

 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.2.0, 3.1.1
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] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

Status: Patch Available  (was: Open)

 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.2.0, 3.1.1
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


 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 Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

Attachment: zookeeper-472.patch

Updated patch to compile against latest trunk.

Also cleaned up some finals.

Also reduced the default child hashset size to 8 rather than 16 (let's be 
conservative
as to the avg number of subnodes).

Small optimization to getchildren in datatree - allocate exactly the right size 
array list

 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


 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] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-11-11 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

Status: Patch Available  (was: Open)

 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.2.0, 3.1.1
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-10 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

Status: Patch Available  (was: Open)

Is this ready? I see some updates, throwing into the patch queue, reviewer 
please be sure all the comments are addressed.

 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.2.0, 3.1.1
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] 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] 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] 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] 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] Updated: (ZOOKEEPER-472) Making DataNode not instantiate a HashMap when the node is ephmeral

2009-07-14 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-472:
---

  Component/s: server
Affects Version/s: 3.1.1
   3.2.0
Fix Version/s: 3.3.0
 Assignee: 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


 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.