本文整理汇总了Java中org.apache.samza.config.Config.keySet方法的典型用法代码示例。如果您正苦于以下问题:Java Config.keySet方法的具体用法?Java Config.keySet怎么用?Java Config.keySet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.samza.config.Config
的用法示例。
在下文中一共展示了Config.keySet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMonitorNames
import org.apache.samza.config.Config; //导入方法依赖的package包/类
/**
*
* @param config contains all the configuration that are defined for the monitors.
* @return a unique collection of monitor names for which configuration has been defined in the config object
*/
private static Set<String> getMonitorNames(Config config) {
Set<String> monitorNames = new HashSet<>();
for (String configKey : config.keySet()) {
String[] configKeyComponents = StringUtils.split(configKey, MONITOR_CONFIG_KEY_SEPARATOR);
Preconditions.checkState(configKeyComponents.length != 0);
String monitorName = configKeyComponents[0];
monitorNames.add(monitorName);
}
return monitorNames;
}
示例2: getResourceNames
import org.apache.samza.config.Config; //导入方法依赖的package包/类
public List<String> getResourceNames() {
Config subConfig = config.subset(RESOURCE_PREFIX, true);
List<String> resourceNames = new ArrayList<String>();
for (String key : subConfig.keySet()) {
if (key.endsWith(PATH_SUFFIX)) {
resourceNames.add(key.substring(0, key.length() - PATH_SUFFIX.length()));
}
}
return resourceNames;
}
示例3: getSchemes
import org.apache.samza.config.Config; //导入方法依赖的package包/类
/**
* Get all schemes
* @return List of schemes in strings
*/
public List<String> getSchemes() {
Config subConfig = config.subset(FS_IMPL_PREFIX, true);
List<String> schemes = new ArrayList<String>();
for (String key : subConfig.keySet()) {
if (key.endsWith(FS_IMPL_SUFFIX)) {
schemes.add(key.substring(0, key.length() - FS_IMPL_SUFFIX.length()));
}
}
return schemes;
}