steinsgateted opened a new pull request, #422:
URL: https://github.com/apache/yunikorn-k8shim/pull/422

   ### What is this PR for?
   state, events and the state machine are in the same location, like 
`application_state.go`,` task_state.go`, `node_state.go`, `scheduler_state.go` .
   
   - Each handle function removes `event *fsm.Event` parameter, like: 
`postTaskAllocated(event *fsm.Event)` becomes
    `postTaskAllocated(allocUUID string, nodeID string)` .
    
   - In `task.go`, both` beforeTaskAllocated` and `postTaskAllocated` are used 
`dispatcher.Dispatch(NewFailTaskEvent(task.applicationID, task.taskID, 
errorMessage))`
    This can be removed and reused the `handleFailEvent` method.
    
   - Remove the original `common/events/states.go` and put the states in a 
separate file:
    `application_state.go`, `task_state.go`, `node_state.go`, 
`scheduler_state.go`.
    
   - The original ` common/events/events.go` moved the EventType into a 
separate file.
   But the events interface remains, because if the interface is removed, 
`dispatch` and `cache` package will have import cycle.
   
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [ ] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [x] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/projects/YUNIKORN/issues/YUNIKORN-186
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to