@Override
	public int run(String[] args) throws Exception {
		Job countJob = new Job();
		Job generateJob = new Job();

		//Parse Arguments and Setting Job.
		parseArguementsAndSetCountJob(args, countJob, generateJob);
		//Run counter job.
		countJob.waitForCompletion(true);
		Counters counters = countJob.getCounters();
		//Check status of finished value of counter job.
		//Set index parameter for generate Mapper
		CounterGroup localCounterGroup = counters.getGroup("LocalCounter".toUpperCase());
		CounterGroup globalCounterGroup = counters.getGroup("globalCounter".toUpperCase());
		Long globalCountSize = globalCounterGroup.findCounter("counter".toUpperCase()).getValue();
		int startIndex = 0;
		for (Counter each : localCounterGroup) {
			String mapperID = each.getName();
			Long mapperCountSize = each.getValue();
			generateJob.getConfiguration().set(mapperID, startIndex + "," + mapperCountSize.toString());
			startIndex = startIndex + Integer.parseInt(mapperCountSize.toString());
		}
		// Run a Generate Job
		return generateJob.waitForCompletion(true) ? 0 : 1;
	}