本文整理了Java中org.apache.storm.utils.Utils.getAlternativeVersionsMap()
方法的一些代码示例,展示了Utils.getAlternativeVersionsMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getAlternativeVersionsMap()
方法的具体详情如下:
包路径:org.apache.storm.utils.Utils
类名称:Utils
方法名:getAlternativeVersionsMap
[英]Get a mapping of the configured supported versions of storm to their actual versions.
[中]获取配置的受支持的storm版本到其实际版本的映射。
代码示例来源:origin: apache/storm
NavigableMap<String, IVersionInfo> versionsMap = Utils.getAlternativeVersionsMap(conf);
List<Map<String, String>> versionList = new ArrayList<>();
for (Map.Entry<String, IVersionInfo> entry : versionsMap.entrySet()) {
代码示例来源:origin: apache/storm
@Test
public void checkVersionInfo() {
Map<String, String> versions = new HashMap<>();
String key = VersionInfo.getVersion();
assertNotEquals("Unknown", key, "Looks like we don't know what version of storm we are");
versions.put(key, System.getProperty("java.class.path"));
Map<String, Object> conf = new HashMap<>();
conf.put(Config.SUPERVISOR_WORKER_VERSION_CLASSPATH_MAP, versions);
NavigableMap<String, IVersionInfo> alternativeVersions = Utils.getAlternativeVersionsMap(conf);
assertEquals(1, alternativeVersions.size());
IVersionInfo found = alternativeVersions.get(key);
assertNotNull(found);
assertEquals(key, found.getVersion());
}
}
内容来源于网络,如有侵权,请联系作者删除!