public static void main(String[] args) {
		// -------------------------Initialize Job Information------------------------------------
		
		/*********************************Big Experiments*********************************/
		
		String bigJobName = "Big-uservisits_aggre-pig-50G";
		
		//String bigJobName = "BigBuildInvertedIndex";
		
		//String bigJobName = "BigTeraSort-36GB";
		
		//String bigJobName = "BigTwitterBiDirectEdgeCount";
		
		//String bigJobName = "BigTwitterInDegreeCount";
		
		//String bigJobName = "BigWiki-m36-r18";
		
		//String baseDir = "/home/xulijie/MR-MEM/BigExperiments/";
		//Boolean hasSplitFile = true;
		
		//int newRNBase = 9;
		//int iterateNum = 192;
		/*********************************Big Experiments*********************************/
	
		
		/*********************************Sample Experiments*********************************/
		String startJobId = "job_201301222028_0001";
		String sampleJobName = "SampleUservisits-1G";
		
		//String startJobId = "job_201301211121_0001";
		//String sampleJobName = "SampleBuildInvertedIndex-1G";
		
		//String startJobId = "job_201301191915_0001";
		//String sampleJobName = "SampleTeraSort-1G";
		
		//String startJobId = "job_201301252338_0001";
		//String sampleJobName = "SampleTwitterBiDirectEdgeCount";
			
		//String startJobId = "job_201301281455_0001";
		//String sampleJobName = "SampleTwitterInDegreeCount";
		
		//String startJobId = "job_201301192319_0001";
		//String sampleJobName = "SampleWikiWordCount-1G";
		
		String bigBaseDir = "G:\\MR-MEM\\BigExperiments\\";
		String sampleBaseDir = "G:\\MR-MEM\\SampleExperiments\\";
		String compBaseDir = "G:\\MR-MEM\\CompExperiments\\";
		//String compBaseDir = "/home/xulijie/MR-MEM/Test/";
		
		Boolean hasSplitFile = true;
				
		int newRNBase = 9;
		int iterateNum = 192;
		/*********************************Sample Experiments*********************************/
		
		int[] splitMBs = {64, 128, 256};
		boolean outputDetailedDataflow = false;
		
		String outputDir = compBaseDir + "SampleTo" + bigJobName + "\\estimatedDM\\";
		
		//boolean needMetrics = true; //going to analyze task counters/metrics/jvm?
		//int sampleMapperNum = 0; // only analyze the first sampleMapperNum mappers (0 means all the mappers)
		//int sampleReducerNum = 0; // only analyze the first sampleReducerNum reducers (0 means all the reducers)
		boolean useRuntimeMaxJvmHeap = false; //since reducers' actual JVM heap is less than mapred.child.java.opts, 
											 //this parameter determines whether to use the actual JVM heap to estimate
		
		//--------------------------Setting ends------------------------------------
		DecimalFormat nf = new DecimalFormat("0000");
		
		for(int i = 0; i < iterateNum; i++) {
			String prefix = startJobId.substring(0, startJobId.length() - 4);
			int suffix = Integer.parseInt(startJobId.substring(startJobId.length() - 4));
			String jobId = prefix + nf.format(suffix + i);		
			//--------------------------Profiling the run job-----------------------------
			SampleToBigDataAndMemoryEstimator je = new SampleToBigDataAndMemoryEstimator();
			boolean successful;

			successful = je.profile(sampleBaseDir, sampleJobName, "serialJob", jobId);
			//--------------------------Profiling ends-----------------------------
			
			if(splitMap.isEmpty())
				computeSplitMap(splitMBs, je.job.getJobConfiguration(), bigBaseDir +  bigJobName, hasSplitFile);
			//--------------------------Estimating Data Flow and Memory-----------------------------
			if(successful == false) {
				System.err.println("[" + jobId + "] is a failed job");
				continue;
			}
					
			try {
			
				je.batchEstimateDataAndMemory(useRuntimeMaxJvmHeap, outputDir + jobId, newRNBase, outputDetailedDataflow);
				
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}	
			//--------------------------Estimating ends-----------------------------
			System.out.println("Finish estimating " + jobId);
		}	
	}