gpt4 book ai didi

io.fabric8.zookeeper.utils.ZooKeeperUtils.createDefault()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 11:30:40 36 4
gpt4 key购买 nike

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

ZooKeeperUtils.createDefault介绍

暂无

代码示例

代码示例来源:origin: io.fabric8/fabric-zookeeper

ZooKeeperUtils.createDefault(curator, "/fabric/authentication/users", allUsers);

代码示例来源:origin: jboss-fuse/fabric8

ZooKeeperUtils.createDefault(curator, "/fabric/authentication/users", allUsers);

代码示例来源:origin: io.fabric8/fabric-partition

public void start() {
  try {
    ZooKeeperUtils.createDefault(curator, workerPath, null);
    cache.getListenable().addListener(this);
    cache.start(true);
    cache.rebuild();
  } catch (Exception e) {
    throw FabricException.launderThrowable(e);
  }
}

代码示例来源:origin: io.fabric8/fabric-partition

@Override
public synchronized void start() {
  try {
    ZooKeeperUtils.createDefault(curator, partitionsPath, null);
    if (partitionCache == null) {
      partitionCache = new PathChildrenCache(curator, partitionsPath, true, false, executorService);
      partitionCache.getListenable().addListener(this);
      partitionCache.start(PathChildrenCache.StartMode.POST_INITIALIZED_EVENT);
      partitionCache.rebuild();
    }
  } catch (Exception e) {
    throw FabricException.launderThrowable(e);
  }
}

代码示例来源:origin: jboss-fuse/fabric8

createDefault(curator.get(), path, "");
String boundPorts = getStringData(curator.get(), path);
if (boundPorts != null && !boundPorts.isEmpty()) {

代码示例来源:origin: jboss-fuse/fabric8

ZooKeeperUtils.createDefault(curator, ZkPath.CONFIG_CONTAINER.getPath(name), versionId);
ZooKeeperUtils.createDefault(curator, ZkPath.CONFIG_VERSIONS_CONTAINER.getPath(versionId, name), profilesBuilder.toString());
ZooKeeperUtils.createDefault(curator, "/fabric/authentication/encryption.enabled", Boolean.valueOf(encryption != null).toString());
ZooKeeperUtils.createDefault(curator, "/fabric/authentication/domain", "karaf");
ZooKeeperUtils.createDefault(curator, ZkPath.AUTHENTICATION_CRYPT_ALGORITHM.getPath(), "PBEWithMD5AndDES");
ZooKeeperUtils.createDefault(curator, ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath(), PasswordEncoder.encode(options.getZookeeperPassword()));

代码示例来源:origin: io.fabric8.runtime/fabric-runtime-embedded

String versionNode = CONFIG_CONTAINER.getPath(karafName);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, karafName);
    ZooKeeperUtils.createDefault(curator.get(), versionNode, version);
    ZooKeeperUtils.createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(karafName), sysprops.getProperty(ZkDefs.BIND_ADDRESS, "0.0.0.0"));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(karafName), getContainerResolutionPolicy(sysprops, curator.get(), karafName));
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(karafName), HostUtils.getLocalHostName());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_IP.getPath(karafName), HostUtils.getLocalIp());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_IP.getPath(karafName), getContainerPointer(curator.get(), karafName));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(karafName), geoLocationService.get().getGeoLocation());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(karafName), minimumPort);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(karafName), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: io.fabric8/fabric-zookeeper

ZooKeeperUtils.createDefault(curator, ZkPath.CONFIG_CONTAINER.getPath(name), versionId);
ZooKeeperUtils.createDefault(curator, ZkPath.CONFIG_VERSIONS_CONTAINER.getPath(versionId, name), profilesBuilder.toString());
ZooKeeperUtils.createDefault(curator, "/fabric/authentication/encryption.enabled", Boolean.valueOf(encryption != null).toString());
ZooKeeperUtils.createDefault(curator, "/fabric/authentication/domain", "karaf");
ZooKeeperUtils.createDefault(curator, ZkPath.AUTHENTICATION_CRYPT_ALGORITHM.getPath(), "PBEWithMD5AndDES");
ZooKeeperUtils.createDefault(curator, ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath(), PasswordEncoder.encode(options.getZookeeperPassword()));

代码示例来源:origin: io.fabric8.runtime/embedded

String versionNode = CONFIG_CONTAINER.getPath(karafName);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, karafName);
    ZooKeeperUtils.createDefault(curator.get(), versionNode, version);
    ZooKeeperUtils.createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(karafName), sysprops.getProperty(ZkDefs.BIND_ADDRESS, "0.0.0.0"));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(karafName), getContainerResolutionPolicy(sysprops, curator.get(), karafName));
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(karafName), HostUtils.getLocalHostName());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_IP.getPath(karafName), HostUtils.getLocalIp());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_IP.getPath(karafName), getContainerPointer(curator.get(), karafName));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(karafName), geoLocationService.get().getGeoLocation());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(karafName), minimumPort);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(karafName), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: jboss-fuse/fabric8

createDefault(curator.get(), containerPortsPath, portAsString);
createDefault(curator.get(), ipPortsPath, portAsString);
if (!existingPorts.contains(portAsString)) {
  setData(curator.get(), ipPortsPath, existingPorts + " " + portAsString);
  createDefault(curator.get(), reservedPortsPath, portAsString);
  String reservedPortsPerContainer = getStringData(curator.get(), reservedPortsPath);
  if (!reservedPortsPerContainer.contains(portAsString)) {

代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-wildfly-registration

String versionNode = CONFIG_CONTAINER.getPath(runtimeIdentity);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, runtimeIdentity);
    ZooKeeperUtils.createDefault(curator.get(), versionNode, version);
    ZooKeeperUtils.createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(runtimeIdentity), bootstrapConfiguration.get().getBindAddress());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(runtimeIdentity), getContainerResolutionPolicy(curator.get(), runtimeIdentity));
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(runtimeIdentity), HostUtils.getLocalHostName());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_IP.getPath(runtimeIdentity), HostUtils.getLocalIp());
  setData(curator.get(), CONTAINER_IP.getPath(runtimeIdentity), ip);
  createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(runtimeIdentity), geoLocationService.get().getGeoLocation());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(runtimeIdentity), minimumPort);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(runtimeIdentity), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: io.fabric8.runtime/fabric8-runtime-container-tomcat-registration

String versionNode = CONFIG_CONTAINER.getPath(runtimeIdentity);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, runtimeIdentity);
    ZooKeeperUtils.createDefault(curator.get(), versionNode, version);
    ZooKeeperUtils.createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(runtimeIdentity), sysprops.getProperty(ZkDefs.BIND_ADDRESS, "0.0.0.0"));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(runtimeIdentity), getContainerResolutionPolicy(sysprops, curator.get(), runtimeIdentity));
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(runtimeIdentity), HostUtils.getLocalHostName());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_IP.getPath(runtimeIdentity), HostUtils.getLocalIp());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_IP.getPath(runtimeIdentity), getContainerPointer(curator.get(), runtimeIdentity));
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(runtimeIdentity), geoLocationService.get().getGeoLocation());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(runtimeIdentity), minimumPort);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(runtimeIdentity), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: jboss-fuse/fabric8

String versionNode = CONFIG_CONTAINER.getPath(runtimeIdentity);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, runtimeIdentity);
    createDefault(curator.get(), versionNode, version);
    createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(runtimeIdentity), bootstrapConfiguration.get().getBindAddress());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(runtimeIdentity), getContainerResolutionPolicy(curator.get(), runtimeIdentity));
  setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(runtimeIdentity), HostUtils.getLocalHostName());
  if (openshiftEnv) {
  setData(curator.get(), CONTAINER_IP.getPath(runtimeIdentity), ip);
  if (Boolean.parseBoolean(runtimeProperties.get().getProperty("service.geoip.enabled", "false"))) {
    createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(runtimeIdentity), geoLocationService.get().getGeoLocation());
    maximumPort = maxPort;
  createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(runtimeIdentity), minimumPort);
  createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(runtimeIdentity), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-karaf-registration

String versionNode = CONFIG_CONTAINER.getPath(runtimeIdentity);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, runtimeIdentity);
    createDefault(curator.get(), versionNode, version);
    createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(runtimeIdentity), bootstrapConfiguration.get().getBindAddress());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(runtimeIdentity), getContainerResolutionPolicy(curator.get(), runtimeIdentity));
  setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(runtimeIdentity), HostUtils.getLocalHostName());
  if (openshiftEnv) {
  createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(runtimeIdentity), geoLocationService.get().getGeoLocation());
  createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(runtimeIdentity), minimumPort);
  createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(runtimeIdentity), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-tomcat-registration

String versionNode = CONFIG_CONTAINER.getPath(runtimeIdentity);
    String profileNode = CONFIG_VERSIONS_CONTAINER.getPath(version, runtimeIdentity);
    ZooKeeperUtils.createDefault(curator.get(), versionNode, version);
    ZooKeeperUtils.createDefault(curator.get(), profileNode, profiles);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_BINDADDRESS.getPath(runtimeIdentity), bootstrapConfiguration.get().getBindAddress());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_RESOLVER.getPath(runtimeIdentity), getContainerResolutionPolicy(curator.get(), runtimeIdentity));
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_HOSTNAME.getPath(runtimeIdentity), HostUtils.getLocalHostName());
  ZooKeeperUtils.setData(curator.get(), CONTAINER_LOCAL_IP.getPath(runtimeIdentity), HostUtils.getLocalIp());
  setData(curator.get(), CONTAINER_IP.getPath(runtimeIdentity), ip);
  createDefault(curator.get(), CONTAINER_GEOLOCATION.getPath(runtimeIdentity), geoLocationService.get().getGeoLocation());
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MIN.getPath(runtimeIdentity), minimumPort);
  ZooKeeperUtils.createDefault(curator.get(), CONTAINER_PORT_MAX.getPath(runtimeIdentity), maximumPort);
} catch (Exception e) {
  LOGGER.warn("Error updating Fabric Container information. This exception will be ignored.", e);

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