You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/28 11:38:01 UTC

[jira] [Updated] (INLONG-190) Start a local dev environment with embedded zookeeper

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

ASF GitHub Bot updated INLONG-190:
----------------------------------
    Labels: pull-request-available  (was: )

> Start a local dev environment with embedded zookeeper
> -----------------------------------------------------
>
>                 Key: INLONG-190
>                 URL: https://issues.apache.org/jira/browse/INLONG-190
>             Project: Apache InLong
>          Issue Type: Wish
>            Reporter: netroby
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> TubeMQ require zookeeper , if you start local dev environment, you may not want to set up zookeeper. so may we start embedded zookeeper?
>  
> for example code : start emmbedded zookeeper
> {code:java}
> Properties startupProperties = ...
> QuorumPeerConfig quorumConfiguration = new QuorumPeerConfig();
> try {
>     quorumConfiguration.parseProperties(startupProperties);
> } catch(Exception e) {
>     throw new RuntimeException(e);
> }
> zooKeeperServer = new ZooKeeperServerMain();
> final ServerConfig configuration = new ServerConfig();
> configuration.readFrom(quorumConfiguration);
> new Thread() {
>     public void run() {
>         try {
>             zooKeeperServer.runFromConfig(configuration);
>         } catch (IOException e) {
>             log.error("ZooKeeper Failed", e);
>         }
>     }
> }.start();{code}



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