[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-08-31 Thread Rakesh R (JIRA)

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

Rakesh R updated ZOOKEEPER-2140:

Assignee: Arshad Mohammad

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
>Assignee: Arshad Mohammad
> Fix For: 3.5.1, 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch, ZOOKEEPER-2140-2.patch, 
> ZOOKEEPER-2140-3.patch, ZOOKEEPER-2140-4.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-07-27 Thread Michi Mutsuzaki (JIRA)

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

Michi Mutsuzaki updated ZOOKEEPER-2140:
---
Fix Version/s: (was: 3.5.2)
   3.5.1

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.5.1, 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch, ZOOKEEPER-2140-2.patch, 
> ZOOKEEPER-2140-3.patch, ZOOKEEPER-2140-4.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-06-27 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Attachment: ZOOKEEPER-2140-4.patch

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch, ZOOKEEPER-2140-2.patch, 
> ZOOKEEPER-2140-3.patch, ZOOKEEPER-2140-4.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-06-26 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Attachment: ZOOKEEPER-2140-3.patch

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch, ZOOKEEPER-2140-2.patch, 
> ZOOKEEPER-2140-3.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-03-16 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Attachment: ZOOKEEPER-2140-2.patch

corrected one spelling mistake and removed Unnecessary 
@SuppressWarnings("unchecked")

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch, ZOOKEEPER-2140-2.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-03-13 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Attachment: ZOOKEEPER-2140-1.patch

> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2140-1.patch
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-03-13 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Description: 
Classes org.apache.zookeeper.server.NIOServerCnxn and 
org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
improvement
1) Duplicate code.
These two classes have around 250 line duplicate code. All the command 
code is duplicated
2) Many improvement/bugFix done in one class but not done in other class. These 
changes should be synced
For example

In NettyServerCnxn
{code}
   // clone should be faster than iteration
// ie give up the cnxns lock faster
AbstractSet cnxns;
synchronized (factory.cnxns) {
cnxns = new HashSet(factory.cnxns);
}
for (ServerCnxn c : cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
In NIOServerCnxn
{code}
   for (ServerCnxn c : factory.cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. Command 
classes have altogether different functionality, the command classes should go 
in different class files.
If this done it will be easy to add new command with minimal change to existing 
classes.


  was:
Classes org.apache.zookeeper.server.NIOServerCnxn and 
org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
improvement
1) Duplicate code.
These two classes have around 250 line duplicate code. All the command 
code is duplicated
2) Many improvement/bugFix done in one class but not done in other class. These 
changes should be synced
For example

In NettyServerCnxn
{code}
   // clone should be faster than iteration
// ie give up the cnxns lock faster
AbstractSet cnxns;
synchronized (factory.cnxns) {
cnxns = new HashSet(factory.cnxns);
}
for (ServerCnxn c : cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
In NIOServerCnxn
{code}
   for (ServerCnxn c : factory.cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
3) These classes are bulky unnecessarily. Command classes have altogether 
different functionality, cmma should go in different classes.
If this done it will be easy to add new command with minimal change to existing 
classes.



> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) NettyServerCnxn and  NIOServerCnxn classes are bulky unnecessarily. 
> Command classes have altogether different functionality, the command classes 
> should go in different class files.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2140) NettyServerCnxn and NIOServerCnxn code should be improved

2015-03-13 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad updated ZOOKEEPER-2140:
---
Description: 
Classes org.apache.zookeeper.server.NIOServerCnxn and 
org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
improvement
1) Duplicate code.
These two classes have around 250 line duplicate code. All the command 
code is duplicated
2) Many improvement/bugFix done in one class but not done in other class. These 
changes should be synced
For example

In NettyServerCnxn
{code}
   // clone should be faster than iteration
// ie give up the cnxns lock faster
AbstractSet cnxns;
synchronized (factory.cnxns) {
cnxns = new HashSet(factory.cnxns);
}
for (ServerCnxn c : cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
In NIOServerCnxn
{code}
   for (ServerCnxn c : factory.cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
3) These classes are bulky unnecessarily. Command classes have altogether 
different functionality, cmma should go in different classes.
If this done it will be easy to add new command with minimal change to existing 
classes.


  was:
Classes org.apache.zookeeper.server.NIOServerCnxn and 
org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
improvement
1) Duplicate code.
These two classes have around 250 line duplicate code. All the command 
code is duplicated
2) Many improvement/bugFix done in one class but not done in other class. These 
changes should be synced
For example

In NettyServerCnxn
{code}
   // clone should be faster than iteration
// ie give up the cnxns lock faster
AbstractSet cnxns;
synchronized (factory.cnxns) {
cnxns = new HashSet(factory.cnxns);
}
for (ServerCnxn c : cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
In NIOServerCnxn
{code}
   for (ServerCnxn c : factory.cnxns) {
c.dumpConnectionInfo(pw, false);
pw.println();
}
{code}
3) These classes are bulky unnecessarily. Command classes have altogether 
different functionality, these should go in different classes.
If this done it will be easy to add new command with minimal change to existing 
classes.



> NettyServerCnxn and NIOServerCnxn code should be improved
> -
>
> Key: ZOOKEEPER-2140
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2140
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Arshad Mohammad
> Fix For: 3.6.0
>
>
> Classes org.apache.zookeeper.server.NIOServerCnxn and 
> org.apache.zookeeper.server.NettyServerCnxn have following need and scope for 
> improvement
> 1) Duplicate code.
>   These two classes have around 250 line duplicate code. All the command 
> code is duplicated
> 2) Many improvement/bugFix done in one class but not done in other class. 
> These changes should be synced
> For example
> In NettyServerCnxn
> {code}
>// clone should be faster than iteration
> // ie give up the cnxns lock faster
> AbstractSet cnxns;
> synchronized (factory.cnxns) {
> cnxns = new HashSet(factory.cnxns);
> }
> for (ServerCnxn c : cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> In NIOServerCnxn
> {code}
>for (ServerCnxn c : factory.cnxns) {
> c.dumpConnectionInfo(pw, false);
> pw.println();
> }
> {code}
> 3) These classes are bulky unnecessarily. Command classes have altogether 
> different functionality, cmma should go in different classes.
> If this done it will be easy to add new command with minimal change to 
> existing classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)