本文整理了Java中backtype.storm.utils.Utils.readDefaultConfig()
方法的一些代码示例,展示了Utils.readDefaultConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.readDefaultConfig()
方法的具体详情如下:
包路径:backtype.storm.utils.Utils
类名称:Utils
方法名:readDefaultConfig
暂无
代码示例来源:origin: alibaba/jstorm
public static Map read_default_config() {
return Utils.readDefaultConfig();
}
代码示例来源:origin: alibaba/mdrill
public static Map read_default_config() {
return Utils.readDefaultConfig();
}
代码示例来源:origin: alibaba/mdrill
public static Map readStormConfig() {
Map ret = readDefaultConfig();
Map storm = findAndReadConfigFile("storm.yaml", false);
ret.putAll(storm);
return ret;
}
代码示例来源:origin: alibaba/jstorm
public static Map readStormConfig() {
Map ret = readDefaultConfig();
String confFile = System.getProperty("storm.conf.file");
Map storm;
if (StringUtils.isBlank(confFile)) {
storm = LoadConf.findAndReadYaml("storm.yaml", false, false);
} else {
storm = loadDefinedConf(confFile);
}
ret.putAll(storm);
ret.putAll(readCommandLineOpts());
replaceLocalDir(ret);
return ret;
}
代码示例来源:origin: alibaba/jstorm
LOG.info("GET RESERVE_WORKERS from ={}", Utils.readDefaultConfig());
LOG.info("RESERVE_WORKERS ={}", Utils.readDefaultConfig().get(Config.RESERVE_WORKERS));
stormConf.put(Config.RESERVE_WORKERS, Utils.readDefaultConfig().get(Config.RESERVE_WORKERS));
stormConf.putAll(nimbusConf);
stormConf.putAll(topologyConf);
代码示例来源:origin: alibaba/jstorm
Map<Group, String> boltIds = genBoltIds(mergedGroups);
Map defaults = Utils.readDefaultConfig();
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public static Map read_default_config() {
return Utils.readDefaultConfig();
}
代码示例来源:origin: com.n3twork.storm/storm-core
public static Map readStormConfig() {
Map ret = readDefaultConfig();
String confFile = System.getProperty("storm.conf.file");
Map storm;
if (confFile==null || confFile.equals("")) {
storm = findAndReadConfigFile("storm.yaml", false);
} else {
storm = findAndReadConfigFile(confFile, true);
}
ret.putAll(storm);
ret.putAll(readCommandLineOpts());
return ret;
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public static Map readStormConfig() {
Map ret = readDefaultConfig();
String confFile = System.getProperty("storm.conf.file");
Map storm;
if (StringUtils.isBlank(confFile)) {
storm = LoadConf.findAndReadYaml("storm.yaml", false, false);
} else {
storm = loadDefinedConf(confFile);
}
ret.putAll(storm);
ret.putAll(readCommandLineOpts());
replaceLocalDir(ret);
return ret;
}
代码示例来源:origin: org.wso2.carbon.event-processing/org.wso2.carbon.event.processor.core
public StormTopologyManager() {
String stormConfigDirPath = CarbonUtils.getCarbonConfigDirPath() + File.separator + "cep" + File.separator + "storm";
try {
InputStream stormConf = new FileInputStream(new File(stormConfigDirPath + File.separator + "storm.yaml"));
Yaml yaml = new Yaml();
Map data = (Map) yaml.load(stormConf);
if (data != null) { //Can be null for a commented out config
stormConfig = Utils.readDefaultConfig();
stormConfig.putAll(data);
} else {
stormConfig = Utils.readStormConfig();
}
} catch (FileNotFoundException e) {
log.warn("Error occurred while reading storm configurations using default configurations", e);
}
DistributedConfiguration stormDeploymentConfiguration = EventProcessorValueHolder.getStormDeploymentConfiguration();
lockTimeout = stormDeploymentConfiguration.getStatusLockTimeout();
jarLocation = stormConfigDirPath + File.separator + EventProcessorValueHolder.getStormDeploymentConfiguration().getJar();
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
Map<Group, String> boltIds = genBoltIds(mergedGroups);
Map defaults = Utils.readDefaultConfig();
内容来源于网络,如有侵权,请联系作者删除!