本文整理了Java中io.fabric8.api.ZooKeeperClusterBootstrap
类的一些代码示例,展示了ZooKeeperClusterBootstrap
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperClusterBootstrap
类的具体详情如下:
包路径:io.fabric8.api.ZooKeeperClusterBootstrap
类名称:ZooKeeperClusterBootstrap
暂无
代码示例来源:origin: jboss-fuse/fabric8
@Override
public void createCluster(Map<String, Object> options) {
assertValid();
RuntimeProperties sysprops = runtimeProperties.get();
CreateEnsembleOptions createEnsembleOptions = ClusterBootstrapManager.getCreateEnsembleOptions(sysprops, options);
bootstrap.get().create(createEnsembleOptions);
}
代码示例来源:origin: jboss-fuse/fabric8
@Override
public void createCluster() {
assertValid();
RuntimeProperties sysprops = runtimeProperties.get();
bootstrap.get().create(CreateEnsembleOptions.builder().fromRuntimeProperties(sysprops).build());
}
代码示例来源:origin: io.fabric8/fabric-boot-commands
bootstrap.create(options);
} else {
ServiceProxy<ZooKeeperClusterService> serviceProxy = ServiceProxy.createServiceProxy(bundleContext, ZooKeeperClusterService.class);
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-itests-common
@Test
public void testLocalFabricCluster() throws Exception {
Builder<?> builder = CreateEnsembleOptions.builder().agentEnabled(false).clean(true).zookeeperPassword(SYSTEM_PASSWORD).waitForProvision(false);
CreateEnsembleOptions options = builder.build();
ZooKeeperClusterBootstrap bootstrap = ServiceLocator.getRequiredService(ZooKeeperClusterBootstrap.class);
bootstrap.create(options);
FabricService fabricService = ServiceLocator.getRequiredService(FabricService.class);
Container[] containers = fabricService.getContainers();
Assert.assertNotNull("Containers not null", containers);
//Test that a provided by command line password exists
ConfigurationAdmin configurationAdmin = ServiceLocator.getRequiredService(ConfigurationAdmin.class);
org.osgi.service.cm.Configuration configuration = configurationAdmin.getConfiguration(io.fabric8.api.Constants.ZOOKEEPER_CLIENT_PID);
Dictionary<String, Object> dictionary = configuration.getProperties();
Assert.assertEquals("Expected provided zookeeper password", PasswordEncoder.encode(SYSTEM_PASSWORD), dictionary.get("zookeeper.password"));
}
}
代码示例来源:origin: jboss-fuse/fabric8
bootstrap.create(options);
} else {
ServiceProxy<ZooKeeperClusterService> serviceProxy = ServiceProxy.createServiceProxy(bundleContext, ZooKeeperClusterService.class);
代码示例来源:origin: io.fabric8.itests/fabric-itests-common
@Test
public void testLocalFabricCluster() throws Exception {
Builder<?> builder = CreateEnsembleOptions.builder().agentEnabled(false).clean(true).zookeeperPassword(ADMIN_PASSWORD).waitForProvision(false);
CreateEnsembleOptions options = builder.build();
ZooKeeperClusterBootstrap bootstrap = ServiceLocator.getRequiredService(ZooKeeperClusterBootstrap.class);
bootstrap.create(options);
FabricService fabricService = ServiceLocator.getRequiredService(FabricService.class);
Container[] containers = fabricService.getContainers();
Assert.assertNotNull("Containers not null", containers);
//Test that a provided default password exists
ConfigurationAdmin configurationAdmin = ServiceLocator.getRequiredService(ConfigurationAdmin.class);
org.osgi.service.cm.Configuration configuration = configurationAdmin.getConfiguration(io.fabric8.api.Constants.ZOOKEEPER_CLIENT_PID);
Dictionary<String, Object> dictionary = configuration.getProperties();
Assert.assertEquals("Expected provided zookeeper password", PasswordEncoder.encode(ADMIN_PASSWORD), dictionary.get("zookeeper.password"));
}
}
代码示例来源:origin: jboss-fuse/fabric8
throw new EnsembleModificationFailed("The first zookeeper cluster must be configured on this container only.", EnsembleModificationFailed.Reason.INVALID_ARGUMENTS);
bootstrap.get().create(options);
return;
内容来源于网络,如有侵权,请联系作者删除!