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