public static void main(String[] args) throws IOException,
			ClassNotFoundException, InterruptedException {
		allCompaniesList = readContentsFromFile();
//		totalSize = allCompaniesList.size();
		fw = new FileWriter(file2.getAbsoluteFile(), true);
		if (!file2.exists()) {
			file2.createNewFile();
		}

		while (totalSize != offset) {
			haspMap = null;
			haspMap = new ConcurrentHashMap<String, ConcurrentHashMap<String, String>>(batchCount);
			if (totalSize < offset) {
				offset = totalSize;
			}
			executorService = null;
			executorService = Executors.newFixedThreadPool(100);
			for (int i = startIndex; i < offset; i++) {
				for (int j = 0; j < i; j++) {
					System.out.println(j + "," + i);
					Company currentCompany = allCompaniesList.get(i);
					Company nextCompany = allCompaniesList.get(j);

					ShortNameRunnable shortNameRunnable = new ShortNameRunnable(
							currentCompany, nextCompany);
					CikNumberRunnable cikNumberRunnable = new CikNumberRunnable(
							currentCompany, nextCompany);
					PrimaryNameRunnable primaryNameRunnable = new PrimaryNameRunnable(
							currentCompany, nextCompany);
					PrimaryDomainNameRunnable primaryDomainNameRunnable = new PrimaryDomainNameRunnable(
							currentCompany, nextCompany);

					executorService.execute(primaryNameRunnable);
					executorService.execute(shortNameRunnable);
					executorService.execute(cikNumberRunnable);
					executorService.execute(primaryDomainNameRunnable);
				}
			}
			executorService.shutdown();
			
			while (true) {
				if (executorService.isTerminated()) {
					break;
				}
			}
			
			System.out.println("Computed HaspMap");
			printMap(haspMap);
			
			if (offset != totalSize) {
				startIndex = offset;
				offset = offset + batchCount;
				
			}
		}

	}