.create(cmdLine.getOptionValue(RunnableOptions.JAR));
} catch (IOException e) {
throw Throwables.propagate(e);
}
Arguments runtimeArguments
= new Gson().fromJson(cmdLine.getOptionValue(RunnableOptions.RUNTIME_ARGS), BasicArguments.class);
programOpts = new SimpleProgramOptions(name, createProgramArguments(context, configs), runtimeArguments);
resourceReporter = new ProgramRunnableResourceReporter(program, metricsCollectionService, context);
// These services need to be starting before initializing the delegate since they are used in
// AbstractContext's constructor to create datasets.
Futures.getUnchecked(
Services.chainStart(zkClientService, kafkaClientService, metricsCollectionService, resourceReporter));
ApplicationSpecification appSpec = program.getSpecification();
String processorName = program.getName();
runnableName = programOpts.getName();
Arguments arguments = programOpts.getArguments();
RunId runId = arguments.hasOption(ProgramOptionConstants.RUN_ID)
? RunIds.fromString(arguments.getOption(ProgramOptionConstants.RUN_ID))
: RunIds.generate();
ServiceSpecification serviceSpec = appSpec.getServices().get(processorName);
final RuntimeSpecification runtimeSpec = serviceSpec.getRunnables().get(runnableName);
String className = runtimeSpec.getRunnableSpecification().getClassName();