@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); } }
throws AlreadyAliveException, InvalidTopologyException { if (!Utils.isValidConf(stormConf)) { throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
@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); } }
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");
if(!Utils.isValidConf(stormConf)) { throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
if (!Utils.isValidConf(stormConf)) { throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
if (!Utils.isValidConf(stormConf)) { throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");