MRFramework/src/main/java/com/mr/util/AWSUtility.java
/**
	 * Reads the ipaddress.txt file and updates the ipmap in App class
	 * 
	 * @param bucket
	 * @param file
	 * @throws IOException
	 */
Reads the ipaddress.txt file and updates the ipmap in App class

@param bucket
@param file
@throws IOException
Reads the ipaddress . txt file and updates the ipmap in App class @param bucket @param file @throws IOException
public static void s3ReadIpFile(String bucket, String file) throws IOException {
		S3Object s3o = App.s3.getObject(new GetObjectRequest(bucket,file));
		BufferedReader reader=new BufferedReader(new InputStreamReader(s3o.getObjectContent()));
		while(true){
			String line=reader.readLine();
			if(line==null)break;
			String[] ips  = line.split(","); 
			int nodeNum = Integer.parseInt(ips[0]);
			if(nodeNum ==0) App.masterip = ips[2];
			else App.ipmap.put(nodeNum, line);
		}
	}
public static void s3ReadIpFile ( String bucket , String file ) throws IOException { S3Object s3o = App . s3 . getObject ( new GetObjectRequest ( bucket , file ) ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( s3o . getObjectContent ( ) ) ) ; while ( true ) { String line = reader . readLine ( ) ; if ( line == null ) break ; String [ ] ips = line . split ( "," ) ; int nodeNum = Integer . parseInt ( ips [ 0 ] ) ; if ( nodeNum == 0 ) App . masterip = ips [ 2 ] ; else App . ipmap . put ( nodeNum , line ) ; } }
Reads the ipaddress.txt file and updates the ipmap in App class
Reads the ipaddress . txt file and updates the ipmap in App class