Goal
Remove deprecated code (class, method) usage from the CDAP Repository.
Relevant JIRA :
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
CDAP Deprecation Checklist
Things to note while deprecating API/Method:
1) When annotation @Deprecated is added, Make sure the description it has information on which method/class to use instead of deprecated method/class.
2) Remove deprecated usage in the codebase and replace them with updated API method/class.
3) If the deprecated method/class is used in any of the dependent repositories, make sure they are updated to use new method/class there.
4) When the deprecated method/class is removed, does it make any other class/method unused. It makes sense to deprecate those class/method as well with description on why.
5) If you are deprecating a property (cdap property), add the old deprecated property and the new property to deprecatedKeyMap and reverseDeprecatedKeyMap in co.cask.cdap.common.conf.Configuration class and only use the new property in code usages.
6) Maven build can show deprecation using the flag -Dmaven.compiler.showDeprecation=true and -Dmaven.compiler.showWarnings=true, This will show the deprecation usages as warnings.
CDAP-API Deprecation Removal
...
Class | Method | Description |
---|---|---|
AbstractApplication | scheduleWorkflow(Schedule schedule, String workflowName) | use ScheduleCreationSpec |
AbstractApplication | scheduleWorkflow(Schedule schedule, String workflowName, Map<String, String> properties) | use ScheduleCreationSpec |
ApplicationConfigurer | addSchedule(Schedule schedule, SchedulableProgramType programType, String programName, | use ScheduleCreationSpec |
MapReduce, Spark | beforeSubmit(MapReduceContext context) | ProgramLifecycle#initialize |
MapReduce, Spark | onFinish(boolean succeeded, MapReduceContext context) | ProgramLifecycle#destroy |
MapReduceTaskContext | getInputName() | getInputContext() |
Plugin | Plugin(ArtifactId artifactId, PluginClass pluginClass, PluginProperties properties) | Constructor without any parent artifacts |
RunConstraints | Entire class | ScheduleBuilder#withConcurrency(int) |
ScheduleSpecification | Entire class | ScheduleCreationSpec |
AbstractWorkflow | addAction(WorkflowAction action) | addAction(CustomAction) |
AbstractWorkflowAction | Entire class | CustomAction |
WorkflowActionConfigurer | Entire class | CustomActionConfigurer |
WorkflowActionNode | getActionSpecification | getCustomActionSpecification |
WorkflowActionSpecification | Entire class | CustomActionSpecification |
WorkflowConditionConfigurer | addAction(WorkflowAction action) | addAction(CustomAction) |
WorkflowConfigurer | addAction(WorkflowAction action) | addAction(CustomAction action) |
WorkflowForkConfigurer | addAction(WorkflowAction action) | addAction(CustomAction action) |
CDAP REST API Removal :
LogHandler
...