本文整理了Java中backtype.storm.utils.Utils.isValidConf()
方法的一些代码示例,展示了Utils.isValidConf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isValidConf()
方法的具体详情如下:
包路径:backtype.storm.utils.Utils
类名称:Utils
方法名:isValidConf
暂无
代码示例来源: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
throws AlreadyAliveException,
InvalidTopologyException {
if (!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
代码示例来源: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
private void submitTopology(String name, Map stormConf, StormTopology stormTopology, String topologyJarPath)
throws AlreadyAliveException, InvalidTopologyException {
if(!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
代码示例来源:origin: com.n3twork.storm/storm-core
if(!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
if (!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
代码示例来源:origin: apache/eagle
if (!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
内容来源于网络,如有侵权,请联系作者删除!