/** * Submits a topology to run on the cluster. A topology runs forever or until explicitly killed. * * @param name the name of the storm. * @param topoConf the topology-specific configuration. See {@link Config}. * @param topology the processing to execute. * @param opts to manipulate the starting of the topology * @param progressListener to track the progress of the jar upload process * @throws AlreadyAliveException if a topology with this name is already running * @throws InvalidTopologyException if an invalid topology was submitted * @throws AuthorizationException if authorization is failed * @thorws SubmitterHookException if any Exception occurs during initialization or invocation of registered {@link ISubmitterHook} */ @SuppressWarnings("unchecked") public static void submitTopology(String name, Map<String, Object> topoConf, StormTopology topology, SubmitOptions opts, ProgressListener progressListener) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException { submitTopologyAs(name, topoConf, topology, opts, progressListener, null); }
System.setProperty("storm.jar", jarPath.toString()); packageTopology(jarPath, processor); StormSubmitter.submitTopologyAs(name, topoConf, topo, opts, progressListener, asUser); } finally { if (jarPath != null) {
/** * Submits a topology to run on the cluster. A topology runs forever or until * explicitly killed. * * * @param name the name of the storm. * @param stormConf the topology-specific configuration. See {@link Config}. * @param topology the processing to execute. * @param opts to manipulate the starting of the topology * @param progressListener to track the progress of the jar upload process * @throws AlreadyAliveException if a topology with this name is already running * @throws InvalidTopologyException if an invalid topology was submitted * @throws AuthorizationException if authorization is failed * @thorws SubmitterHookException if any Exception occurs during initialization or invocation of registered {@link ISubmitterHook} */ @SuppressWarnings("unchecked") public static void submitTopology(String name, Map stormConf, StormTopology topology, SubmitOptions opts, ProgressListener progressListener) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException { submitTopologyAs(name, stormConf, topology, opts, progressListener, null); }