code: public static void main(String[] args) {
  
  		 List<String> tmpArgs = new ArrayList<String>(Arrays.asList(args));
  		
  		boolean isLocal = isLocal(tmpArgs);
  		int numWorker = StormSamoaUtils.numWorkers(tmpArgs);
  		
  		args = tmpArgs.toArray(new String[0]);
  		
  		//convert the arguments into Storm topology
  		StormTopology stormTopo = StormSamoaUtils.argsToTopology(args);
  		String topologyName = stormTopo.getTopologyName();
  		
      	Config conf = new Config();
      	conf.putAll(Utils.readStormConfig());
      	conf.setDebug(false);
      			
      	
  		if(isLocal){
  			//local mode
  			conf.setMaxTaskParallelism(numWorker);
  			
  			backtype.storm.LocalCluster cluster = new backtype.storm.LocalCluster();
  			cluster.submitTopology(topologyName , conf, stormTopo.getStormBuilder().createTopology());
  			
  			backtype.storm.utils.Utils.sleep(600*1000);
  			
  			cluster.killTopology(topologyName);
  			cluster.shutdown();
  			
  		}else{
  			//cluster mode
  			conf.setNumWorkers(numWorker);
  			try {
  				backtype.storm.StormSubmitter.submitTopology(topologyName, conf,
  						stormTopo.getStormBuilder().createTopology());
  			} catch (backtype.storm.generated.AlreadyAliveException ale) {
  				ale.printStackTrace();
  			} catch (backtype.storm.generated.InvalidTopologyException ite) {
  				ite.printStackTrace();
  			}
  		}
  	}
docs: The main method.
  
  @param args the arguments