[ 
https://issues.apache.org/jira/browse/HDFS-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186026#comment-13186026
 ] 

Suresh Srinivas commented on HDFS-2681:
---------------------------------------

Really nice job with the tests. May be you can also create a real ZK based 
test. This could be done in another jira.

Here are the comments:
Comments:
# Please use System.arraycopy() instead of byte[] clone.
# Split process into two different methods processZkEvent and processZnodeEvent?

# Test
# Change the method name to init(). Annotate it @Before. It will be 
automatically called before tests.
# Use @Expected for tests that expect exception
# Add class level javadoc.
# #Init need not catch IOException. Just throw it. The test will fail.
# You can reduce several lines of code by using a static byte[] DATA;
# can you add test where jointElection() is called twice and the second call is 
NO-OP
# Many times where processResult is called back to back can be in for loop
# Why should 4 errors of connection loss result in fatalError?
# testStatNodeError already covers some part of 
testCreateNodeResultRetryBecomeActive
# Instead of catching InterruptedException, you can just throw it

                
> Add ZK client for leader election
> ---------------------------------
>
>                 Key: HDFS-2681
>                 URL: https://issues.apache.org/jira/browse/HDFS-2681
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Suresh Srinivas
>            Assignee: Bikas Saha
>             Fix For: HA branch (HDFS-1623)
>
>         Attachments: HDFS-2681.HDFS-1623.patch, HDFS-2681.HDFS-1623.patch, 
> HDFS-2681.HDFS-1623.patch, Zookeeper based Leader Election and Monitoring 
> Library.pdf
>
>
> ZKClient needs to support the following capabilities:
> # Ability to create a znode for co-ordinating leader election.
> # Ability to monitor and receive call backs when active znode status changes.
> # Ability to get information about the active node.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to