public TestJvmManager() throws Exception { user = UserGroupInformation.getCurrentUser().getShortUserName(); tt = new TaskTracker(); ttConf = new JobConf(); ttConf.setLong("mapred.tasktracker.tasks.sleeptime-before-sigkill", 2000); tt.setConf(ttConf); tt.setMaxMapSlots(MAP_SLOTS); tt.setMaxReduceSlots(REDUCE_SLOTS); TaskController dtc; tt.setTaskController((dtc = new DefaultTaskController())); Configuration conf = new Configuration(); dtc.setConf(conf); LocalDirAllocator ldirAlloc = new LocalDirAllocator(JobConf.MAPRED_LOCAL_DIR_PROPERTY); tt.getTaskController().setup(ldirAlloc, new LocalStorage(ttConf.getLocalDirs())); JobID jobId = new JobID("test", 0); jvmManager = new JvmManager(tt); tt.setJvmManagerInstance(jvmManager); tt.setUserLogManager(new UserLogManager(ttConf)); tt.setCleanupThread(new InlineCleanupQueue()); }