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

ASF GitHub Bot updated ZOOKEEPER-3874:
--------------------------------------
    Labels: pull-request-available  (was: )

> Official API to start ZooKeeper server from Java
> ------------------------------------------------
>
>                 Key: ZOOKEEPER-3874
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3874
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: server
>    Affects Versions: 3.6.1
>            Reporter: Enrico Olivelli
>            Assignee: Enrico Olivelli
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.7.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We want to introduce a new API to boot a ZooKeeper server node from Java.
> Currently (up to 3.6.1) we are distributing a tarball that contains binaries 
> and bash scripts to launch the server.
> We are also deploying to Maven central the zookeeper-server jar that contains 
> the server side code together with the java client code.
> People are used to use that Jar to start the ZooKeeper server inside a Java 
> process.
> Two use cases:
>  * run tests of applications based on ZooKeeper (like Curator TestingServer)
>  * launch ZooKeeper with some Java based process management system
> Currently such applications that want to run ZooKeeper server use internal 
> code, in the most fancy ways, in order to setup something that 'works'.
> This is very error prone because ZooKeeper server internals change from 
> version to version, because the only contracts are the configuration file 
> format and the wire protocols (client-server and server-server).
>  
> With this new feature we want to define a stable API that allows:
>  * to configure and start a ZooKeeper server (standalone or cluster)
>  * stop it gracefully (even if the suggested way to stop ZooKeeper is to use 
> "kill -9")
>  * check that the server is alive
>  * configure the MetricsProvider instance to use (in order to integrate 
> better with the metrics system provided by the runtime environment)
> The configuration will be passed as a java.util.Properties object or a Java 
> File (or Path) object.
>  
> We are going to create a wrapper around ZooKeeperMain and other classes.
> ZooKeeper bootstrap code is already used in many fancy ways, the less we 
> change it the better it is for the sake of stability.
>  
> In is out of scope to support Java applications that embed ZooKeeper server 
> and use the ZooKeeper client, this is not a good idea and it must not be 
> suggested.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to