Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.

CDAP-API Deprecation Removal

 

ClassMethodDescription
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,
Map<String, String> properties)
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

/namespaces/{namespace-id}/apps/{app-id}/{program-type}/{program-id}/logs


 

Overview of Deprecated usage in repository.

Package#Usage
cdap-api31
cdap-app-fabric14
cdap-app-templates16
cdap-client151
cdap-cli10
cdap-proto35
cdap-test23
cdap-unit-test20
cdap-common5

 

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

 

 

 

 

  • No labels