Zookeeper 客户端 .net访问框架 ZookeeperNetEx项目开发编译

一、项目简介

ZooKeeperNetEx 项目是一个针对.NET开发的异步客户端库,旨在为开发者提供高效且可靠的分布式协调服务。‌ 该项目完全基于任务异步编程,兼容.NET 4.61及以上版本,包括.NET Core。ZooKeeperNetEx严格遵循官方Java客户端的逻辑,代码实现与Java版本高度相似,使得从Java系统迁移到.NET系统变得更加容易‌。

项目地址:https://github.com/shayhatsor/zookeeper

下载项目:

bash 复制代码
git clone https://github.com/shayhatsor/zookeeper.git

二、准备环境

bash 复制代码
C:\Users\zhuji>git -v
git version 2.37.0.windows.1

C:\Users\zhuji>java --version
openjdk 11.0.16.1 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40648 (build 11.0.16.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40648 (build 11.0.16.1+1-LTS, mixed mode)

C:\Users\zhuji>ant -v
Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed

C:\Users\zhuji>dotnet --list-sdks
6.0.404 [C:\Program Files\dotnet\sdk]
9.0.203 [C:\Program Files\dotnet\sdk]

三、生成验证

下载完项目后,进入项目目录,运行ant。

bash 复制代码
E:\Temp\zookeeper>ant
Buildfile: E:\Temp\zookeeper\build.xml

init:

ivy-download:

ivy-taskdef:

ivy-init:

ivy-retrieve:
[ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = E:\Temp\zookeeper\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: org.apache.zookeeper#zookeeper;3.4.12
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found org.slf4j#slf4j-api;1.7.25 in maven2
[ivy:retrieve]  found org.slf4j#slf4j-log4j12;1.7.25 in maven2
[ivy:retrieve]  found log4j#log4j;1.2.17 in maven2
[ivy:retrieve]  found jline#jline;0.9.94 in maven2
[ivy:retrieve]  found org.apache.yetus#audience-annotations;0.5.0 in maven2
[ivy:retrieve]  found io.netty#netty;3.10.6.Final in maven2
[ivy:retrieve] :: resolution report :: resolve 131ms :: artifacts dl 7ms
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      default     |   6   |   0   |   0   |   0   ||   6   |   0   |
        ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  0 artifacts copied, 6 already retrieved (0kB/5ms)

clover.setup:

clover.info:

clover:

jute:

compile_jute_uptodate:

compile_jute:

ver-gen:

git-revision:
     [exec]
     [exec] E:\Temp\zookeeper>echo off

version-info:

build-generated:
    [javac] Compiling 1 source file to E:\Temp\zookeeper\build\classes
    [javac] 警告: [options] 未与 -source 6 一起设置引导类路径
    [javac] 警告: [options] 源值6已过时, 将在未来所有发行版中删除
    [javac] 警告: [options] 目标值1.6已过时, 将在未来所有发行版中删除
    [javac] 警告: [options] 要隐藏有关已过时选项的警告, 请使用 -Xlint:-options。
    [javac] 4 个警告

compile:

jar:
      [jar] Building jar: E:\Temp\zookeeper\build\zookeeper-3.4.12.jar

BUILD SUCCESSFUL
Total time: 2 seconds

完成无错误后,进入src/csharp目录,使用vs2022打开 ZooKeeperNetEx.sln项目

打开项目后,编译生成即可。

四、参考文档

https://github.com/shayhatsor/zookeeper#

相关推荐
猫林老师2 小时前
HarmonyOS线程模型与性能优化实战
数据库·分布式·harmonyos
在未来等你6 小时前
Elasticsearch面试精讲 Day 26:集群部署与配置最佳实践
大数据·分布式·elasticsearch·搜索引擎·面试
勤源科技6 小时前
分布式链路追踪中的上下文传播与一致性维护技术
分布式
互联网工匠6 小时前
分布式操作的一致性方案
分布式·架构
熊猫钓鱼>_>6 小时前
【案例实战】鸿蒙分布式智能办公应用的架构设计与性能优化
分布式·华为·harmonyos
没有bug.的程序员10 小时前
金融支付分布式架构实战:从理论到生产级实现
java·分布式·微服务·金融·架构·分布式调度系统
在未来等你10 小时前
Elasticsearch面试精讲 Day 25:Elasticsearch SQL与数据分析
大数据·分布式·elasticsearch·搜索引擎·面试
有一个好名字12 小时前
万字 Apache ShardingSphere 完全指南:从分库分表到分布式数据库生态
数据库·分布式·apache
Aurora_eye12 小时前
记录之Ubuntu22.4虚拟机及hadoop为分布式安装
大数据·hadoop·分布式
斯班奇的好朋友阿法法14 小时前
rabbitmq服务端消费端实例(direct和fanout模式)
分布式·rabbitmq·ruby