12345678910111213141516171819202122232425262728293031323334353637 |
- @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<LocalResource>} resources;
- union {null, bytes} containerTokens; // FileSystem related and other application specific tokens.
- union {null, map<bytes>} serviceData;
- //env to be set before launching the command
- //KEY-> env variable name
- //VALUE -> env variable value.
- map<string> env;
- //commandline to launch the container. All resources are downloaded in the
- //working directory of the command.
- array<string> 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;
- }
|