You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "César Álvarez Núñez (JIRA)" <ji...@apache.org> on 2011/09/06 16:42:10 UTC

[jira] [Created] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Support for custom org.apache.zookeeper.client.HostProvider implementation.
---------------------------------------------------------------------------

                 Key: ZOOKEEPER-1172
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
             Project: ZooKeeper
          Issue Type: Improvement
          Components: java client
            Reporter: César Álvarez Núñez
            Priority: Minor


The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.

Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

     Description: 
The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.

Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

  was:
The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.

Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

    Release Note: Support for custom org.apache.zookeeper.client.HostProvider implementation with the help of new Zookeeper constructor methods.  (was: Support for custom org.apache.zookeeper.client.HostProvider implementation.)

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Thomas Koch commented on ZOOKEEPER-1172:
----------------------------------------

Could you please upload the patch to https://reviews.apache.org/r/new/ for review?

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

    Attachment: ZOOKEEPER-1172.patch

Fixed FindBug and TestCase.
                
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Hadoop QA commented on ZOOKEEPER-1172:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 9 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/598//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/598//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/598//console

This message is automatically generated.
                
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Patrick Hunt updated ZOOKEEPER-1172:
------------------------------------

    Priority: Major  (was: Minor)

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

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


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

(Updated 2011-10-05 12:00:44.407863)


Review request for zookeeper.


Summary
-------


                
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Hadoop QA commented on ZOOKEEPER-1172:
--------------------------------------

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

    +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/527//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/527//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/527//console

This message is automatically generated.

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

    Attachment: ZOOKEEPER-1172.patch

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Priority: Minor
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108459#comment-13108459 ] 

César Álvarez Núñez commented on ZOOKEEPER-1172:
------------------------------------------------

Done. Since it is my first time please let me know if I've missed something.

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

    Attachment:     (was: ZOOKEEPER-1172.patch)

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098930#comment-13098930 ] 

César Álvarez Núñez commented on ZOOKEEPER-1172:
------------------------------------------------

Sorry, I should have read the link [https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute How To Contribute] more carefully.

Fixed findbugs and core test issues. Running full "ant test".

With regard to "don't use system properties/env, rather use config file", I'm not really sure if config file is the best option since it contains server configuration properties and not client properties.

Anyway I think that a better approach is to include a new constructor like the following (with its corresponding two sibling without 'canBeReadOnly' and 'sessionId & sessionPasswd'.):

{code:title=ZooKeeper.java|borderStyle=solid}
    public ZooKeeper(HostProvider hostProvider,
                 String chroot,
                 int sessionTimeout,
                 Watcher watcher,
                 long sessionId,
                 byte[] sessionPasswd,
                 boolean canBeReadOnly) throws IOException
{code} 

Where "connectString" is replaced by two new parameters: HostProvider and chroot.
In fact "chroot" should be separated from "servers list" because you can interpret that it is allowed to set a chroot per server (server1:port1/chroot1,server2:port2/chroot2).

I understand that there is not any limitation on adding new constructors as long as backward compatibility is not broken, don't I?

Finally, why priority has been changed to "Major"? I don't like it could block in some way the 3.4.0 release.

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Mahadev konar updated ZOOKEEPER-1172:
-------------------------------------

    Fix Version/s: 3.5.0
    
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

    Attachment: ZOOKEEPER-1172.patch
    
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Gunnar Wagenknecht commented on ZOOKEEPER-1172:
-----------------------------------------------

Some feedback on that patch (note, I'm not a ZK committer).
* I don't like {{ZooConstructorParams}}. I'd prefer just adding a new constructor to ZooKeeper. The requested builder pattern can be implemented on top of that, i.e. a {{ZooKeeperBuilder}} that just invokes that appropriate {{ZooKeeper}} constructor when done.
* Removing a public method in a public class (eg., {{ConnectStringParser}}) is a breaking API change (if that class is considered API). BTW, adding new constructors or methods to classes is no breaking change and doable for a {{x.y+1}} release.

                
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Hadoop QA commented on ZOOKEEPER-1172:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 18 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 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 failed core unit tests.

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

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

This message is automatically generated.

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Priority: Minor
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Thomas Koch commented on ZOOKEEPER-1172:
----------------------------------------

The review system should have posted a comment here in Jira with a link to the review request. You missed to specify the number of this issue when you created the review request.
(This whole setup is not perfect... http://permalink.gmane.org/gmane.comp.apache.infrastructure.devel/1361 )

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Hadoop QA commented on ZOOKEEPER-1172:
--------------------------------------

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

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

    +1 tests included.  The patch appears to include 9 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 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 failed core unit tests.

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

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

This message is automatically generated.
                
> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Benjamin Reed commented on ZOOKEEPER-1172:
------------------------------------------

this is great functionality.

@phunt i'm not sure why you are objecting to a system property. i think it is much better than putting it in the constructors.

doing a chroot per server will not work. the trees in each replica must be the same, so using different roots for servers will cause problems. (it's also separate functionality that shouldn't be in this jira.)

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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

       

[jira] [Updated] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

Posted by "César Álvarez Núñez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

César Álvarez Núñez updated ZOOKEEPER-1172:
-------------------------------------------

    Attachment: ZOOKEEPER-1172.patch

New approach based on new Zookeeper constructors. 

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by pointing the system property "zookeeper.clientHostProvider" to the class name of your custom HostProvider implementation.

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

       

[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

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

Thomas Koch commented on ZOOKEEPER-1172:
----------------------------------------

The issue number in ReviewBoard should just be ZOOKEEPER-XYZ, not the full URL.

> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1172
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: César Álvarez Núñez
>            Assignee: César Álvarez Núñez
>         Attachments: ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper constructor.
> Now it could be replaced by any other implementation just by calling the new Zookeeper constructor methods which accept a HostProvider as paramater.

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