public void init() throws RemoteException, UnknownHostException, NotBoundException, IOException {
		
		/* Export and bind TaskTracker */
		Registry registry = LocateRegistry.createRegistry(this.registryPort);
		TaskTrackerRemoteInterface stub = (TaskTrackerRemoteInterface) UnicastRemoteObject.exportObject(this, 0);
		registry.rebind(MapReduce.TaskTracker.Common.TASK_TRACKER_SERVICE_NAME, stub);
		
		/* Locate JobTracker */
		Registry jobTrackerR = LocateRegistry.getRegistry(this.jobTrackerIp, this.jobTrackerPort);
		this.jobTrackerStub = (JobTrackerRemoteInterface)jobTrackerR.lookup(MapReduce.Core.JOB_TRACKER_SERVICE_NAME);
		
		/* Join the MapReduce cluster */
		this.taskTrackerIp = Inet4Address.getLocalHost().getHostAddress();
		this.name = 
			this.jobTrackerStub.join( this.taskTrackerIp,
				this.registryPort, this.serverPort, MapReduce.TaskTracker.Individual.CORE_NUM);
		
		/* Finish the TaskTracker temporary folder */
		this.taskTrackerTmpFolder += "/" + this.name;
		File taskTrackerTmpFolderFile = new File (this.taskTrackerTmpFolder);
		if (!taskTrackerTmpFolderFile.exists()) {
			taskTrackerTmpFolderFile.mkdir();
		} 
		
		
		this.taskTrackerMapperFolderName  = this.taskTrackerTmpFolder + "/" + "Mapper";
		this.taskTrackerReducerFolderName = this.taskTrackerTmpFolder + "/" + "Reducer";
		
		File taskTrackerMapperFolder = new File(this.taskTrackerMapperFolderName);
		if (!taskTrackerMapperFolder.exists()) {
			taskTrackerMapperFolder.mkdir();
		} else {
			for (File staleFile : taskTrackerMapperFolder.listFiles()) {
				staleFile.delete();
			}
		}
		
		File taskTrackerReducerFolder = new File(this.taskTrackerReducerFolderName);
		if (!taskTrackerReducerFolder.exists()) {
			taskTrackerReducerFolder.mkdir();
		} else {
			for (File staleFile : taskTrackerReducerFolder.listFiles()) {
				staleFile.delete();
			}
		}
		
		this.taskJarFolder = new File(this.taskTrackerTmpFolder + "/" + "Jar");
		if (!this.taskJarFolder.exists()) {
			this.taskJarFolder.mkdir();
		} else {
			for (File staleFile : this.taskJarFolder.listFiles()) {
				staleFile.delete();
			}
		}

		/* Start Heart beat */
		HeartBeat hb = new HeartBeat();
		Thread heartBeatTh = new Thread(hb);
		heartBeatTh.start();
		
		/* Start process update routine */
		ProcessUpdate pu = new ProcessUpdate();
		Thread processUpdateTh = new Thread(pu);
		processUpdateTh.start();
		
		/* Start the partition transferring server */
		PartitionServer sv = new PartitionServer(this.serverPort);
		Thread serverTh = new Thread(sv);
		serverTh.start();
		
		if (MapReduce.Core.DEBUG) {
			System.out.println("DEBUG TaskTracker.init(): TaskTracker Initialization succeeds.");
		}
	}