ContainerManager.genavro 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. @namespace("org.apache.hadoop.yarn")
  2. protocol ContainerManager {
  3. import idl "yarn/yarn-api/src/main/avro/yarn-types.genavro";
  4. record ContainerLaunchContext {
  5. ContainerID id;
  6. string user; // TODO: Shouldn't pass it like this.
  7. Resource resource; // TODO: Needs RM validation
  8. union {null, map<LocalResource>} resources;
  9. union {null, bytes} containerTokens; // FileSystem related and other application specific tokens.
  10. union {null, map<bytes>} serviceData;
  11. //env to be set before launching the command
  12. //KEY-> env variable name
  13. //VALUE -> env variable value.
  14. map<string> env;
  15. //commandline to launch the container. All resources are downloaded in the
  16. //working directory of the command.
  17. array<string> command;
  18. }
  19. record ContainerStatus {
  20. ContainerID containerID;
  21. ContainerState state;
  22. int exitStatus;
  23. }
  24. void startContainer(ContainerLaunchContext container) throws YarnRemoteException;
  25. void stopContainer(ContainerID containerID) throws YarnRemoteException;
  26. void cleanupContainer(ContainerID containerID) throws YarnRemoteException;
  27. ContainerStatus getContainerStatus(ContainerID containerID) throws YarnRemoteException;
  28. }