yangwwei commented on a change in pull request #145:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/145#discussion_r427774391
##########
File path: pkg/cache/application_state.go
##########
@@ -31,76 +31,102 @@ import (
// ----------------------------------
// application events
// ----------------------------------
-type ApplicationEvent int
+type applicationEvent int
const (
- AcceptApplication ApplicationEvent = iota
- RejectApplication
+ AcceptApplication applicationEvent = iota
+ StartApplication
RunApplication
+ WaitApplication
+ RejectApplication
CompleteApplication
KillApplication
)
-func (ae ApplicationEvent) String() string {
- return [...]string{"AcceptApplication", "RejectApplication",
"RunApplication", "CompleteApplication", "KillApplication"}[ae]
+func (ae applicationEvent) String() string {
+ return [...]string{"AcceptApplication", "StartApplication",
"RunApplication", "WaitApplication", "RejectApplication",
"CompleteApplication", "KillApplication"}[ae]
}
// ----------------------------------
// application states
// ----------------------------------
-type ApplicationState int
+type applicationState int
const (
- New ApplicationState = iota
+ New applicationState = iota
Accepted
- Rejected
+ Starting
Running
+ Waiting
+ Rejected
Completed
Killed
Review comment:
I found the meaning of these states is really confusing.
Can you please add the comment here, and also in a doc. I think we need a
design doc for this as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]