static void estimationCal(String[] hashRecord,File segFile,int sampleNumPerSeg,Map<String, long[]> estimateBase ) throws FileNotFoundException {
		 /*
		  * Load the input file into the index, 
		  * initialize the uniqueRecord,sampledRecord,hashRecord
		  * if sampled, compare it to the index:match? extract FP from that container
		  */	 
		 long chunkNum=segsize*1024/chunksize;;
		Scanner loadIn;
//		System.out.println("The segfile is: " + segFile.getAbsolutePath());
		loadIn = new Scanner(segFile);
		loadIn.nextLine();
		int i=0;
		while(loadIn.hasNextLine()){
			String[] infor = loadIn.nextLine().split(",");
//			System.out.println("the current i is: " + i);
			hashRecord[i] = infor[4]; //put the hashvalue into the RAM for the following comparison
			i++;
		}
		loadIn.close();
			/*
			 * Put the samples into the sample base
			 */
			for(int count = 1; count <= sampleNumPerSeg; count++){
			int randomNum =(int)(Math.random()*(chunkNum-1)); 
			if(hashRecord[randomNum] != null && !estimateBase.containsKey(hashRecord[randomNum])){
				long estMeta[] = new long[2];
				estMeta[0] = 1;
				estMeta[1] = 0;
				estimateBase.put(hashRecord[randomNum], estMeta);
			}else if(hashRecord[randomNum] == null){
				count -- ;  //maybe the random num indicates the empty record because that the segment is not full
			}else if(hashRecord[randomNum] != null && estimateBase.containsKey(hashRecord[randomNum])){
				long estMeta[] = new long[2];
				estMeta = estimateBase.get(hashRecord[randomNum]);
				estMeta[0] ++;
				estimateBase.put(hashRecord[randomNum], estMeta);
			}
			}
			
			
			/*
			 * deduplication process
			 */
				for(int k = 0; k < hashRecord.length;k++){
					//estimation
					if(estimateBase.containsKey(hashRecord[k])){
						long estMeta[] = new long[2];
						estMeta = estimateBase.get(hashRecord[k]);
						estMeta[1] ++;
						estimateBase.put(hashRecord[k], estMeta);
					}
				}
		
	}