本文整理了Java中backtype.storm.utils.Utils.readCommandLineOpts()
方法的一些代码示例,展示了Utils.readCommandLineOpts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.readCommandLineOpts()
方法的具体详情如下:
包路径:backtype.storm.utils.Utils
类名称:Utils
方法名:readCommandLineOpts
暂无
代码示例来源: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
@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);
}
}
代码示例来源:origin: alibaba/jstorm
userTotalConf.putAll(Utils.readCommandLineOpts());
代码示例来源: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: com.alibaba.jstorm/jstorm-core
@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);
}
}
代码示例来源:origin: lmco/streamflow
stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
代码示例来源:origin: com.n3twork.storm/storm-core
stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
代码示例来源:origin: apache/eagle
stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
内容来源于网络,如有侵权,请联系作者删除!