| @namespace("org.apache.hadoop.yarn") |
| protocol types { |
| |
| record ApplicationID { |
| int id; |
| long clusterTimeStamp; |
| } |
| |
| record ContainerID { |
| ApplicationID appID; // the application id to which this container belong. |
| int id;// unique string for this application |
| } |
| |
| error YarnRemoteException { |
| union { null, string } message; |
| union { null, string } trace; //stackTrace |
| union { null, YarnRemoteException } cause; |
| } |
| |
| record Resource { |
| int memory; |
| //int diskspace; |
| } |
| |
| // State of the container on the ContainerManager. |
| enum ContainerState { |
| INTIALIZING, |
| RUNNING, |
| COMPLETE |
| } |
| |
| record ContainerToken { |
| bytes identifier; |
| bytes password; |
| string kind; |
| string service; |
| } |
| |
| record Container { |
| ContainerID id; |
| string hostName; |
| Resource resource; |
| ContainerState state; |
| union {ContainerToken, null} containerToken; |
| } |
| |
| enum ApplicationState { |
| PENDING, |
| ALLOCATING, |
| ALLOCATED, |
| EXPIRED_PENDING, |
| LAUNCHING, |
| LAUNCHED, |
| RUNNING, |
| PAUSED, |
| CLEANUP, |
| COMPLETED, |
| KILLED, |
| FAILED |
| } |
| |
| record ApplicationStatus { |
| int responseID; // TODO: This should be renamed as previousResponseID |
| ApplicationID applicationId; |
| float progress; |
| long lastSeen; |
| } |
| |
| record ApplicationMaster { |
| ApplicationID applicationId; |
| union { null, string } host; |
| int rpcPort; |
| int httpPort; |
| ApplicationStatus status; |
| ApplicationState state; |
| union { null, string } clientToken; |
| } |
| |
| record URL { |
| string scheme; |
| union { null, string } host; |
| int port; |
| string file; |
| } |
| |
| enum LocalResourceVisibility { |
| // accessible to applications from all users |
| PUBLIC, |
| // accessible only to applications from the submitting user |
| PRIVATE, |
| // accessible only to this application |
| APPLICATION |
| } |
| |
| enum LocalResourceType { |
| // an archive to be expanded |
| ARCHIVE, |
| // uninterpreted file |
| FILE |
| } |
| |
| record LocalResource { |
| URL resource; |
| long size; |
| long timestamp; |
| LocalResourceType type; |
| LocalResourceVisibility state; |
| } |
| } |