zkconfig-resources

A ZooKeeper based configuration resources holder

Лицензия

Лицензия

The Artistic License 2.0
Категории

Категории

Ant Компиляция и сборка config Библиотеки уровня приложения Configuration
Группа

Группа

com.github.phantomthief
Идентификатор

Идентификатор

zkconfig-resources
Последняя версия

Последняя версия

1.1.28
Дата

Дата

Тип

Тип

jar
Описание

Описание

zkconfig-resources
A ZooKeeper based configuration resources holder
Ссылка на сайт

Ссылка на сайт

https://github.com/PhantomThief/zkconfig-resources
Система контроля версий

Система контроля версий

https://github.com/PhantomThief/zkconfig-resources.git

Скачать zkconfig-resources

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.phantomthief/zkconfig-resources/ -->
<dependency>
    <groupId>com.github.phantomthief</groupId>
    <artifactId>zkconfig-resources</artifactId>
    <version>1.1.28</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.phantomthief/zkconfig-resources/
implementation 'com.github.phantomthief:zkconfig-resources:1.1.28'
// https://jarcasting.com/artifacts/com.github.phantomthief/zkconfig-resources/
implementation ("com.github.phantomthief:zkconfig-resources:1.1.28")
'com.github.phantomthief:zkconfig-resources:jar:1.1.28'
<dependency org="com.github.phantomthief" name="zkconfig-resources" rev="1.1.28">
  <artifact name="zkconfig-resources" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.phantomthief', module='zkconfig-resources', version='1.1.28')
)
libraryDependencies += "com.github.phantomthief" % "zkconfig-resources" % "1.1.28"
[com.github.phantomthief/zkconfig-resources "1.1.28"]

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
com.github.phantomthief : more-lambdas jar 0.1.8
org.slf4j : slf4j-api jar 1.7.22
org.apache.curator : curator-recipes jar [4.0.0,)
com.google.guava : guava jar 21.0
org.apache.commons : commons-lang3 jar 3.4
com.google.code.findbugs : jsr305 Необязательный jar 3.0.1

test (5)

Идентификатор библиотеки Тип Версия
org.apache.curator : curator-test jar 4.0.0
org.junit.jupiter : junit-jupiter-api jar 5.0.2
com.fasterxml.jackson.core : jackson-databind jar 2.9.7
ch.qos.logback : logback-classic jar 1.1.8
org.jetbrains.kotlin : kotlin-reflect jar 1.2.51

Модули Проекта

Данный проект не имеет модулей.

zkconfig-resources

Build Status Coverage Status Maven Central

ZooKeeper节点缓存,基于CuratorFramework封装

  • 节点变更时,旧资源清理机制
  • 强类型泛型支持
  • 只支持Java8

Get Started

ZkBasedNodeResource<ShardedJedisPool> node = ZkBasedNodeResource.<ShardedJedisPool> newBuilder()
                .withCacheFactory(ZKPaths.makePath("/redis", monitorPath), ZkClientHolder::get)
                .withStringFactory(this::initObject)
                .withCleanup(ShardedJedisPool::close)
                .build();

ShardedJedisPool pool = node.get();                

使用test-zk34测试兼容性

test-zk34默认会打一个bin二进制包,可以利用二进制包来进行curator,zookeeper-client,zookeeper-server各种版本组合进行兼容性的测试。

# 指定curator和zookeeper-client的版本
mvn -Dcurator.version=4.2.0 -Dzookeeper.version=3.6.0 clean install -DskipTests
cd test-zk34/target
tar -xzvf zkconfig-resources-test-zk34-${version}-bin.tar.gz
cd zkconfig-resources-test-zk34-${version}-bin

# 连接localhost:2181并运行所有测试,并强制curator使用zk34兼容模式
TEST_PROP="-Dzk.zk34CompatibilityMode=true" sh bin/run_tests.sh "localhost:2181"

# 没有指定脚本参数,会使用curator-test内置的TestingServer进行测试
sh bin/run_tests.sh

Версии библиотеки

Версия
1.1.28
1.1.27
1.1.26
1.1.25
1.1.24
1.1.23
1.1.22
1.1.21
1.1.20
1.1.19
1.1.18
1.1.17
1.1.16
1.1.15
1.1.14
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0