本文整理了Java中com.liveramp.hank.config.yaml.YamlCoordinatorConfigurator.validate()
方法的一些代码示例,展示了YamlCoordinatorConfigurator.validate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlCoordinatorConfigurator.validate()
方法的具体详情如下:
包路径:com.liveramp.hank.config.yaml.YamlCoordinatorConfigurator
类名称:YamlCoordinatorConfigurator
方法名:validate
暂无
代码示例来源:origin: LiveRamp/hank
@Override
public Coordinator createCoordinator() {
try {
validate();
} catch (InvalidConfigurationException e) {
throw new RuntimeException("Configuration is invalid!", e);
}
String factoryClassName = getString(COORDINATOR_SECTION_KEY, COORDINATOR__FACTORY_KEY);
Class<CoordinatorFactory> factoryClass;
try {
factoryClass = (Class<CoordinatorFactory>) Class.forName(factoryClassName);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Could not load coordinator factory class " + factoryClassName + "!", e);
}
CoordinatorFactory factory;
try {
factory = factoryClass.newInstance();
} catch (Exception e) {
throw new RuntimeException("Could not get an instance of " + factoryClass.getName() + "!", e);
}
return factory.getCoordinator(getSection(COORDINATOR_SECTION_KEY, COORDINATOR__OPTIONS_KEY));
}
}
代码示例来源:origin: LiveRamp/hank
@Override
protected void validate() throws InvalidConfigurationException {
super.validate();
getRequiredSection(SMART_CLIENT_SECTION_KEY);
getRequiredInteger(SMART_CLIENT_SECTION_KEY, NUM_WORKER_THREADS);
getRequiredInteger(SMART_CLIENT_SECTION_KEY, SERVICE_PORT_KEY);
getRequiredString(SMART_CLIENT_SECTION_KEY, RING_GROUP_NAME_KEY);
}
}
代码示例来源:origin: LiveRamp/hank
@Override
protected void validate() throws InvalidConfigurationException {
super.validate();
getRequiredSection(RING_GROUP_CONDUCTOR_SECTION_KEY);
getRequiredString(RING_GROUP_CONDUCTOR_SECTION_KEY, RING_GROUP_NAME_KEY);
getRequiredInteger(RING_GROUP_CONDUCTOR_SECTION_KEY, SLEEP_INTERVAL_KEY);
getRequiredInteger(RING_GROUP_CONDUCTOR_SECTION_KEY, MIN_RING_FULLY_SERVING_OBSERVATIONS_KEY);
getRequiredString(RING_GROUP_CONDUCTOR_SECTION_KEY, INITIAL_MODE_KEY);
}
}
代码示例来源:origin: LiveRamp/hank
@Override
public void validate() throws InvalidConfigurationException {
super.validate();
getRequiredSection(HANK_SMART_CLIENT_SECTION_KEY);
getRequiredString(HANK_SMART_CLIENT_SECTION_KEY, RING_GROUP_NAME_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, NUM_CONNECTIONS_PER_HOST_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, QUERY_NUM_MAX_TRIES_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, TRY_LOCK_CONNECTION_TIMEOUT_MS_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, ESTABLISH_CONNECTION_TIMEOUT_MS_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, QUERY_TIMEOUT_MS_KEY);
getRequiredInteger(HANK_SMART_CLIENT_SECTION_KEY, BULK_QUERY_TIMEOUT_MS_KEY);
}
代码示例来源:origin: LiveRamp/hank
@Override
protected void validate() throws InvalidConfigurationException {
super.validate();
getRequiredSection(PARTITION_SERVER_SECTION_KEY);
getRequiredStringList(PARTITION_SERVER_SECTION_KEY, LOCAL_DATA_DIRS_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, SERVICE_PORT_KEY);
getRequiredString(PARTITION_SERVER_SECTION_KEY, RING_GROUP_NAME_KEY);
getRequiredSection(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
NUM_CONCURRENT_QUERIES_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
NUM_CONCURRENT_GET_BULK_TASKS);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
GET_BULK_TASK_SIZE);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
GET_TIMER_AGGREGATOR_WINDOW_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
BUFFER_REUSE_MAX_SIZE);
getRequiredLong(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
CACHE_NUM_BYTES_CAPACITY);
getRequiredLong(PARTITION_SERVER_SECTION_KEY, PARTITION_SERVER_DAEMON_SECTION_KEY,
CACHE_NUM_ITEMS_CAPACITY);
getRequiredSection(PARTITION_SERVER_SECTION_KEY, UPDATE_DAEMON_SECTION_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, UPDATE_DAEMON_SECTION_KEY, NUM_CONCURRENT_UPDATES_KEY);
getRequiredInteger(PARTITION_SERVER_SECTION_KEY, UPDATE_DAEMON_SECTION_KEY, MAX_CONCURRENT_UPDATES_PER_DATA_DIRECTORY_KEY);
}
内容来源于网络,如有侵权,请联系作者删除!