Goal
Remove deprecated code (class, method) usage from the CDAP Repository.
Relevant JIRA :
Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
Overview of Deprecated usage in repository.
Package | #Usage |
---|---|
cdap-api | 31 |
cdap-app-fabric | 14 |
cdap-app-templates | 16 |
cdap-client | 151 |
cdap-cli | 10 |
cdap-proto | 35 |
cdap-test | 23 |
cdap-unit-test | 20 |
cdap-common | 5 |
Details
CDAP-Client (151)
- Straight forward to remove most of the client api deprecations, except for schedule client and metrics client.
- Metrics Client - Runtime metrics usage have to be updated before removal.
- Schedule Client - We have methods that are marked deprecated, but ScheduleInstanceConfiguration is not deprecated yet. No information on how to convert ScheduleInstanceConfiguration to ScheduleDetail ?
CDAP-API
- Schedule API related deprecation in AbstractApplication and ApplicationConfigurer - Related JIRA https://issues.cask.co/browse/CDAP-12692
- Use ProgramLifecycle Initialize and Destroy(deprecated) instead of Map-reduce beforeSubmit and onFinish.
- Use ProgramLifecycle Initialize and Destroy (deprecated) instead of Spark beforeSubmit and onFinish.
- Use ScheduleBuilder#withConcurrency instead of RunConstraints
- Use ScheduleCreationSpec instead of ScheduleSpecification Related JIRA : https://issues.cask.co/browse/CDAP-11575
- Workflow Action and Related deprecation
- Note : Workflow program is run as workflow action(wrapped) this needs to be handled appropriately.
Questions :
- Why do we have unused variable in IndexedTableDefinition which are deprecated ?
- there is a TODO to remove methods “getStreams, getDatasetModules, getDatasetSpecs", However there is no information on what to use instead for their usages.
CDAP-App-Fabric
- ForwardingTwillPreparer deprecations can be ignored, those methods will be removed in the future from TwillPreparer API.
- Deprecation in CustomActionExecutor, DefaultWorkflowActionConfigurer, WorkflowNodeCreator related to Workflow Action deprecation.
- AppFabricTestbase, AppFabricClient deprecations for methods about Schedule Specification (CDAP-11575)
CDAP-App-Templates
- use settableArguments method instead of get/set arguments
- use addOutput() for batch sink methods
- remove deprecated Engine class
- constructors deprecated in ETLBatchConfig, ETLConfig (v1)
CDAP-CLI
- Methods in classes related to Preferences (get, set, load, delete) preferences.
CDAP-Proto
- ApplicationDetail - use getArifact deprecated getArtifactVersion
MetadataRecord deprecated without info on what to use instead - used at multiple places.
- remove getId method in ApplicationRecord, DatasetRecord, ProgramLiveInfo, ProgramRecord,
- Schedule related deprecation ScheduleDetail (toScheduleSpecs), ScheduleType, ScheduleUpdateDetail (CDAP-11575)
- Id class has a lot of deprecations, since its used widely, will be prudent to do those deprecations later.
CDAP-Test
- Id related deprecations
- waitForFinish in program manager
- schedules in workflow
CDAP-unit-test
- Implementation of test interfaces, so similar deprecations as above.
CDAP-common
- Constants, KafkaConstants (simple except for one or two properties which were not deprecated properly)
- UnauthorizedException
CDAP-Data-fabric
- encode/decode obsoleteAttributes methods in AbstractSnapshotCodec (note about breaking backward compatibility)
- TransactionEdit, TransactionEditCodecs (note about will be removed in future, here for backward compat)
Dependent Changes
- Other repositories have to be updated, hydrator-plugins, integration-tests, wrangler, need to be updated if they are using the deprecated API.
- some of the apps might need an update if they are still using the deprecated API's for workflow etc
- cdap-docs might have to be updated as they use old API in some examples