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; }
@SuppressWarnings("unchecked") @Override public void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) { if (!Utils.isValidConf(conf)) throw new RuntimeException("Topology conf is not json-serializable"); conf.putAll(LocalUtils.getLocalBaseConf()); conf.putAll(Utils.readCommandLineOpts()); try { if (submitOpts == null) { state.getNimbus().submitTopology(topologyName, null, Utils.to_json(conf), topology); } else { state.getNimbus().submitTopologyWithOpts(topologyName, null, Utils.to_json(conf), topology, submitOpts); } } catch (Exception e) { LOG.error("failed to submit topology " + topologyName, e); throw new RuntimeException(e); } }
userTotalConf.putAll(Utils.readCommandLineOpts());
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; }
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; }
@SuppressWarnings("unchecked") @Override public void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) { if (!Utils.isValidConf(conf)) throw new RuntimeException("Topology conf is not json-serializable"); conf.putAll(LocalUtils.getLocalBaseConf()); conf.putAll(Utils.readCommandLineOpts()); try { if (submitOpts == null) { state.getNimbus().submitTopology(topologyName, null, Utils.to_json(conf), topology); } else { state.getNimbus().submitTopologyWithOpts(topologyName, null, Utils.to_json(conf), topology, submitOpts); } } catch (Exception e) { LOG.error("Failed to submit topology " + topologyName, e); throw new RuntimeException(e); } }
stormConf.putAll(Utils.readCommandLineOpts()); Map conf = Utils.readStormConfig(); conf.putAll(stormConf);
stormConf.putAll(Utils.readCommandLineOpts()); Map conf = Utils.readStormConfig(); conf.putAll(stormConf);
stormConf.putAll(Utils.readCommandLineOpts()); Map conf = Utils.readStormConfig(); conf.putAll(stormConf);
stormConf.putAll(Utils.readCommandLineOpts()); Map conf = Utils.readStormConfig(); conf.putAll(stormConf);