private static void monitorChannel(final ServerSocket server) {
		new Thread(new Runnable() {
			@Override
			public void run() {
				try {
					while (isRunning) {
						Socket socket = server.accept();
						Communication comm = new Communication(socket);
						Message msg = comm.readMessage();
						Communication clientCmm;
						switch (msg.getMsgType()) {
						case Utility.MAPPERDONE:
							System.out
									.println("Received mappers done message from task tracker["
											+ msg.getTaskTrackerID()
											+ "] for job[" + msg.getJobID() + "].");
							int maped = completedMapNodes.get(msg.getJobID());
							completedMapNodes.put(msg.getJobID(), ++maped);
							clientCmm = comms.get(msg.getJobID());
							clientCmm.sendMessage(msg);
							if(maped == Utility.TASKTRACKERS.size()){
								String jobID = msg.getJobID();
								System.out.println("Now run reducers for job["
										+ jobID + "].");
								for (int i = 0; i < taskTrackerComms.size(); i++) {
									List<ReduceBasicContext> reduceTaskList = taskTrackerContexts
											.get(i).jobReducers.get(jobID);
									msg = new Message(Utility.RUNREDUCER,
											reduceTaskList);
									taskTrackerComms.get(i).sendMessage(msg);
								}
							}
							break;
						case Utility.CONF:
							System.out.println("Received a new Job");
							submitJob(msg.getConfiguration(), comm);
							break;
						case Utility.REDUCERDONE:
							clientCmm = comms.get(msg.getJobID());
							clientCmm.sendMessage(msg);
							break;
						case Utility.TASKTRACKERHEARTBEAT:
							break;
						default:
							break;
						}
					}
					server.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}).start();
	}