gpt4 book ai didi

io.fabric8.api.ZooKeeperClusterBootstrap类的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 19:15:31 27 4
gpt4 key购买 nike

本文整理了Java中io.fabric8.api.ZooKeeperClusterBootstrap类的一些代码示例,展示了ZooKeeperClusterBootstrap类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperClusterBootstrap类的具体详情如下:
包路径:io.fabric8.api.ZooKeeperClusterBootstrap
类名称: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;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com