@namespace("org.apache.hadoop.yarn") protocol ContainerManager { import idl "yarn/yarn-api/src/main/avro/yarn-types.genavro"; record ContainerLaunchContext { ContainerID id; string user; // TODO: Shouldn't pass it like this. Resource resource; // TODO: Needs RM validation union {null, map} resources; union {null, bytes} containerTokens; // FileSystem related and other application specific tokens. union {null, map} serviceData; //env to be set before launching the command //KEY-> env variable name //VALUE -> env variable value. map env; //commandline to launch the container. All resources are downloaded in the //working directory of the command. array command; } record ContainerStatus { ContainerID containerID; ContainerState state; int exitStatus; } void startContainer(ContainerLaunchContext container) throws YarnRemoteException; void stopContainer(ContainerID containerID) throws YarnRemoteException; void cleanupContainer(ContainerID containerID) throws YarnRemoteException; ContainerStatus getContainerStatus(ContainerID containerID) throws YarnRemoteException; }