private MapReduceManager getMapReduceManager(final String jobName, Map<String, String> arguments,
final String programType) {
try {
final ProgramId jobId = startProgram(jobName, arguments, programType);
return new MapReduceManager() {
@Override
public void stop() {
stopProgram(jobId);
}