ZK@3.8源码-00-源码环境

ZK@3.8源码-源码环境

1 源码

可以从官网或者我的笔记上clone,使用的分支是branch-3.8

我的笔记在study-3.8分支上

2 调试工具

工具 版本
IDE 2022.3.2
JDK 1.8

3 IDE设置

3.1 JRE

3.2 Resources

4 文件准备

4.1 配置文件

拷贝conf/zoo_sample.cfg为conf/zoo.cfg,内容如下

4.2 日志配置

拷贝conf/logback.xml到zookeeper-server/src/main/resources/logback.xml

5 gitignore更新

新增如下内容

# debug conf
conf/zoo.cfg
conf/zoo*.cfg
zookeeper-server/src/main/resources/logback.xml

6 pom更新

6.1 jetty-server

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-server</artifactId>
    <!-- <scope>provided</scope> -->
</dependency>

6.2 jetty-servlet

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-servlet</artifactId>
    <!-- <scope>provided</scope> -->
</dependency>

6.3 jetty-client

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-client</artifactId>
    <!-- <scope>provided</scope> -->
</dependency>

6.4 metrics-core

<dependency>
    <groupId>io.dropwizard.metrics</groupId>
    <artifactId>metrics-core</artifactId>
    <scope>compile</scope>
</dependency>

6.5 metrics-graphite

<dependency>
    <groupId>io.dropwizard.metrics</groupId>
    <artifactId>metrics-graphite</artifactId>
    <version>4.1.12.1</version>
</dependency>

6.6 snappy-java

<dependency>
    <groupId>org.xerial.snappy</groupId>
    <artifactId>snappy-java</artifactId>
    <!-- <scope>provided</scope> -->
</dependency>

7 启动

posted @   Bannirui  阅读(52)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示