// very small value, so that no task escapes to successful completion.
fConf.set(TaskMemoryManagerThread.TT_MEMORY_MANAGER_MONITORING_INTERVAL,
String.valueOf(300));
// reserve all memory on TT so that the job will exceed memory limits
LinuxResourceCalculatorPlugin memoryCalculatorPlugin =
new LinuxResourceCalculatorPlugin();
long totalPhysicalMemory = memoryCalculatorPlugin.getPhysicalMemorySize();
long reservedPhysicalMemory = totalPhysicalMemory / (1024 * 1024) + 1;
fConf.setLong(JobConf.MAPRED_JOB_MAP_MEMORY_MB_PROPERTY, 1024 * 1024L);
fConf.setLong(JobConf.MAPRED_JOB_REDUCE_MEMORY_MB_PROPERTY, 1024 * 1024L);
fConf.setLong(TaskMemoryManagerThread.TT_RESERVED_PHYSICAL_MEMORY_MB,
reservedPhysicalMemory);