dockerzhang opened a new issue #789:
URL: https://github.com/apache/incubator-inlong/issues/789


   <p>TubeMQ require zookeeper , if you start local dev environment, you may 
not want to set up zookeeper. so may we start embedded zookeeper?</p>
   
   <p> </p>
   
   <p>for example code : start emmbedded zookeeper</p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
   <pre class="code-java">
   Properties startupProperties = ...
   
   QuorumPeerConfig quorumConfiguration = <span class="code-keyword">new</span> 
QuorumPeerConfig();
   <span class="code-keyword">try</span> {
       quorumConfiguration.parseProperties(startupProperties);
   } <span class="code-keyword">catch</span>(Exception e) {
       <span class="code-keyword">throw</span> <span 
class="code-keyword">new</span> RuntimeException(e);
   }
   
   zooKeeperServer = <span class="code-keyword">new</span> 
ZooKeeperServerMain();
   <span class="code-keyword">final</span> ServerConfig configuration = <span 
class="code-keyword">new</span> ServerConfig();
   configuration.readFrom(quorumConfiguration);
   
   <span class="code-keyword">new</span> <span 
class="code-object">Thread</span>() {
       <span class="code-keyword">public</span> void run() {
   <span class="code-keyword">try</span> {
       zooKeeperServer.runFromConfig(configuration);
   } <span class="code-keyword">catch</span> (IOException e) {
       log.error(<span class="code-quote">"ZooKeeper Failed"</span>, e);
   }
       }
   }.start();</pre>
   </div></div>
   <i>JIRA link - <a 
href="https://issues.apache.org/jira/browse/INLONG-190";>[INLONG-190]</a> 
created by netroby</i>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to