Move the logic of recording of states to the MDS from ProgramLifeCycleHttpHandler to the ProgramRunner classes.

Description

Program can be started by various means as:
1. Trigger by Schedule (ScheduleTaskRunner)
2. Explicitly started by rest endpoint/UI (ProgramLifeCycleHttpHandler)
3. Triggered from Workflow (AbstractProgramWorkflowRunner)

The logic to record the state changes need to be duplicated in the places from where program can be started. Instead of this, the logic can be moved to the ProgramRunner classes, so that irrespective of how the program was started, its state will be recorded correctly.

For MapReduce program the fix is done as a part of jira - https://issues.cask.co/browse/CDAP-1293.

The same should be done for other programs(SPARK, FLOW etc.) as well.

Release Notes

None

Activity

Show:
Sameet Sapra
July 26, 2017, 12:43 AM

PR merged: https://github.com/caskdata/cdap/pull/9158

Remaining work (creating the InMemoryProgramRunners for other program types and moving the ProgramStateWriters to the InMemory and Distributed runners) will be done here:
https://issues.cask.co/browse/CDAP-12179

Sameet Sapra
June 28, 2017, 11:07 PM

To refactor program states, I'll take this on first, then switch out the runtime store for a program status publisher.

Andreas Neumann
November 18, 2016, 11:11 PM

A more robust way of recording state changes would be to rely on transactional messaging. This is a platform capability that is being added in 4.0. Once that is in place, we can address this properly. Moving to 4.2

Terence Yim
July 8, 2015, 9:03 AM
Fixed

Assignee

Sameet Sapra

Reporter

Sagar Kapare

Labels