TwillSpecification twillSpec = loadTwillSpec(twillSpecFile);
renameLocalFiles(twillSpec.getRunnables().get(runnableName));
TwillRunnableSpecification runnableSpec = twillSpec.getRunnables().get(runnableName).getRunnableSpecification();
ContainerInfo containerInfo = new EnvContainerInfo();
Arguments arguments = decodeArgs();
BasicTwillContext context = new BasicTwillContext(
runId, appRunId, containerInfo.getHost(),
arguments.getRunnableArguments().get(runnableName).toArray(new String[0]),
arguments.getArguments().toArray(new String[0]),
runnableSpec, instanceId, discoveryService, discoveryService, instanceCount,
containerInfo.getMemoryMB(), containerInfo.getVirtualCores()
);
Configuration conf = new YarnConfiguration(new HdfsConfiguration(new Configuration()));
Service service = new TwillContainerService(context, containerInfo,
getContainerZKClient(zkClientService, appRunId, runnableName),