作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中io.pravega.controller.store.client.impl.ZKClientConfigImpl
类的一些代码示例,展示了ZKClientConfigImpl
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClientConfigImpl
类的具体详情如下:
包路径:io.pravega.controller.store.client.impl.ZKClientConfigImpl
类名称:ZKClientConfigImpl
[英]Zookeeper Curator framework client config.
[中]Zookeeper策展人框架客户端配置。
代码示例来源:origin: pravega/pravega
Consumer<Void> expirationHandler = x -> sessionExpiry.complete(null);
CuratorFramework client = StoreClientFactory.createZKClient(ZKClientConfigImpl.builder().connectionString(zkServer.getConnectString())
.namespace("test").maxRetries(10).initialSleepInterval(10).secureConnectionToZooKeeper(false).sessionTimeoutMs(15000).build(),
canRetrySupplier, expirationHandler);
代码示例来源:origin: pravega/pravega
@Override
public void setup() {
try {
zkServer = new TestingServerStarter().start();
} catch (Exception e) {
log.error("Error starting test zk server");
Assert.fail("Error starting test zk server");
}
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder().connectionString(zkServer.getConnectString())
.initialSleepInterval(500)
.maxRetries(10)
.sessionTimeoutMs(10 * 1000)
.namespace("pravega/" + UUID.randomUUID())
.build();
storeClientConfig = StoreClientConfigImpl.withZKClient(zkClientConfig);
}
代码示例来源:origin: pravega/pravega
statsProvider.start();
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder()
.connectionString(Config.ZK_URL)
.secureConnectionToZooKeeper(Config.SECURE_ZK)
代码示例来源:origin: pravega/pravega
@Override
public void setup() {
try {
zkServer = new TestingServerStarter().start();
} catch (Exception e) {
log.error("Error starting test zk server");
Assert.fail("Error starting test zk server");
}
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder().connectionString(zkServer.getConnectString())
.initialSleepInterval(500)
.maxRetries(10)
.namespace("pravega/" + UUID.randomUUID())
.sessionTimeoutMs(10 * 1000)
.build();
storeClientConfig = StoreClientConfigImpl.withZKClient(zkClientConfig);
storeClient = StoreClientFactory.createStoreClient(storeClientConfig);
Assert.assertNotNull(storeClient);
}
代码示例来源:origin: pravega/pravega
final int containerCount, int restPort) {
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder().connectionString(connectionString)
.initialSleepInterval(500)
.maxRetries(10)
代码示例来源:origin: pravega/pravega
@Test
public void zkHostStoreTests() {
try {
@Cleanup
TestingServer zkTestServer = new TestingServerStarter().start();
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder().connectionString(zkTestServer.getConnectString())
.initialSleepInterval(2000)
.maxRetries(1)
.sessionTimeoutMs(10 * 1000)
.namespace("hostStoreTest/" + UUID.randomUUID())
.build();
StoreClientConfig storeClientConfig = StoreClientConfigImpl.withZKClient(zkClientConfig);
@Cleanup
StoreClient storeClient = StoreClientFactory.createStoreClient(storeClientConfig);
HostMonitorConfig hostMonitorConfig = HostMonitorConfigImpl.builder()
.hostMonitorEnabled(true)
.hostMonitorMinRebalanceInterval(10)
.containerCount(containerCount)
.build();
// Create ZK based host store.
HostControllerStore hostStore = HostStoreFactory.createStore(hostMonitorConfig, storeClient);
// Update host store map.
hostStore.updateHostContainersMap(HostMonitorConfigImpl.getHostContainerMap(host, controllerPort, containerCount));
validateStore(hostStore);
} catch (Exception e) {
log.error("Unexpected error", e);
Assert.fail();
}
}
代码示例来源:origin: pravega/pravega
private ControllerServiceMain startLocalController(int controllerId) {
ZKClientConfig zkClientConfig = ZKClientConfigImpl.builder()
.connectionString(zkUrl)
.namespace("pravega/" + clusterName)
代码示例来源:origin: pravega/pravega
() -> ZKClientConfigImpl.builder().connectionString(null).build());
() -> ZKClientConfigImpl.builder().connectionString("localhost").build());
() -> ZKClientConfigImpl.builder().connectionString("localhost").namespace("test")
.initialSleepInterval(-10).build());
() -> ZKClientConfigImpl.builder().connectionString("localhost").namespace("test")
.initialSleepInterval(10).maxRetries(-10).namespace("").build());
() -> ZKClientConfigImpl.builder().connectionString("localhost").namespace("test")
.sessionTimeoutMs(-10).namespace("").build());
本文整理了Java中io.pravega.controller.store.client.impl.ZKClientConfigImpl.builder()方法的一些代码示例,展示了ZKClientC
我是一名优秀的程序员,十分优秀!