public synchronized void addPartition(int jobID,
			HashMap<Integer, ArrayDeque<String[]>> map) {
		// get partition for the job
		HashMap<Integer, ArrayDeque<String[]>> temp = partition.get(jobID);
		if (temp == null) {
			temp = new HashMap<Integer, ArrayDeque<String[]>>();
		}
		for (Entry<Integer, ArrayDeque<String[]>> entry : map.entrySet()) {
			int key = entry.getKey(); // slaveID
			ArrayDeque<String[]> value = entry.getValue(); // partitions
			ArrayDeque<String[]> cur = temp.get(key);
			if (cur == null) {
				cur = new ArrayDeque<String[]>();
			}
			cur.addAll(value);
			temp.put(key, cur);
			partition.put(jobID, temp);
		}
	}