MRFramework/src/main/java/com/mr/net/App.java
/**
	 * Functionality :
	 * 
	 * 1. Reads system properties from command line parameters (id,type) 
	 * 		and calls appropriate method
	 * 2. Calls createInstance method to create desired instances on EC2
	 * 3. Reads the IpAddresses.txt file to read all instances that are created
	 * 4. Calls Master node to create Server and listen for sockets
	 * 5. Calls Node to start client servers and start mapreduce operation.
	 * 
	 * @throws Exception
	 */
Functionality .

1. Reads system properties from command line parameters (id,type)
and calls appropriate method
2. Calls createInstance method to create desired instances on EC2
3. Reads the IpAddresses.txt file to read all instances that are created
4. Calls Master node to create Server and listen for sockets
5. Calls Node to start client servers and start mapreduce operation.

@throws Exception
Functionality . 1 . Reads system properties from command line parameters ( id type ) and calls appropriate method 2 . Calls createInstance method to create desired instances on EC2 3 . Reads the IpAddresses . txt file to read all instances that are created 4 . Calls Master node to create Server and listen for sockets 5 . Calls Node to start client servers and start mapreduce operation . @throws Exception
public void run() throws Exception {
		String type=System.getProperty("type");
		String id=System.getProperty("id");
		ReadProperty.readFromFile("config.properties");
		s3 = new AmazonS3Client(new BasicAWSCredentials(key, pwd));
		if(type == null) CreateInstances.initialize();
		else if(type.equals("master")) {
			AWSUtility.s3ReadIpFile(bucket, ipFile);
			filesList  = AWSUtility.s3ReadBuckets(bucket, inputPath);
			logger.info("array length= " + filesList.length);
			new MasterServer<KEY, VALUE>().startServer();
		} else if (type.equals("slave")){
			nodeIdentity = Integer.parseInt(id);
			new Node<KEY, VALUE>(mapper, reducer).run();
		}
	}
public void run ( ) throws Exception { String type = System . getProperty ( "type" ) ; String id = System . getProperty ( "id" ) ; ReadProperty . readFromFile ( "config.properties" ) ; s3 = new AmazonS3Client ( new BasicAWSCredentials ( key , pwd ) ) ; if ( type == null ) CreateInstances . initialize ( ) ; else if ( type . equals ( "master" ) ) { AWSUtility . s3ReadIpFile ( bucket , ipFile ) ; filesList = AWSUtility . s3ReadBuckets ( bucket , inputPath ) ; logger . info ( "array length= " + filesList . length ) ; new MasterServer < KEY , VALUE > ( ) . startServer ( ) ; } else if ( type . equals ( "slave" ) ) { nodeIdentity = Integer . parseInt ( id ) ; new Node < KEY , VALUE > ( mapper , reducer ) . run ( ) ; } }
Functionality :
Functionality :