MRFramework/src/main/java/com/mr/util/CreateInstances.java
/**
	 * This function takes input as "start/stop, number of instance, secret key,
	 * access key, region, bucket name, instance type". This will start
	 * instances, upload file to s3 bucket with the instances data and stop
	 * instances
	 * 
	 * @param args
	 * @throws Exception
	 */
This function takes input as "start/stop, number of instance, secret key,
access key, region, bucket name, instance type". This will start
instances, upload file to s3 bucket with the instances data and stop
instances

@param args
@throws Exception
This function takes input as " start / stop number of instance secret key access key region bucket name instance type " . This will start instances upload file to s3 bucket with the instances data and stop instances @param args @throws Exception
public static void initialize() throws Exception {
		PropertyConfigurator.configure("log4j.properties");
		bucketName=App.bucket;
		secretKey=App.key;
		accessKey=App.pwd;
		startUp();
		if (action.toLowerCase().equals("start")) {
			createInstances(numberOfEC2Instances);
			writeIPsIntoS3Bucket();
			copyJarToInstances();
			runJarInInstances();
		} else if (action.toLowerCase().equals("stop")) {
			readIPsFromS3Bucket();
			terminateInstances();
			deleteSecurityGroup();
		} else {
			log.info("please check the configuration file prioperties ");
			System.exit(-1);
		}
	}
public static void initialize ( ) throws Exception { PropertyConfigurator . configure ( "log4j.properties" ) ; bucketName = App . bucket ; secretKey = App . key ; accessKey = App . pwd ; startUp ( ) ; if ( action . toLowerCase ( ) . equals ( "start" ) ) { createInstances ( numberOfEC2Instances ) ; writeIPsIntoS3Bucket ( ) ; copyJarToInstances ( ) ; runJarInInstances ( ) ; } else if ( action . toLowerCase ( ) . equals ( "stop" ) ) { readIPsFromS3Bucket ( ) ; terminateInstances ( ) ; deleteSecurityGroup ( ) ; } else { log . info ( "please check the configuration file prioperties " ) ; System . exit ( - 1 ) ; } }
This function takes input as "start/stop, number of instance, secret key,
 access key, region, bucket name, instance type".
This function takes input as " start / stop number of instance secret key access key region bucket name instance type " .