apache / apache/dolphinscheduler

[DSIP-23][TaskPlugin] Add Lifecycle method to TaskPlugin

Open
#14,877 6 comments 2 reactions 0 assignees View on GitHub
DSIP improvement
Dominant language
Java
Stars
14.5k
Forks
5.1k
Avg merge
1d 21h
Merged PRs (30d)
28

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.

### Description

Right now, we have define some methods at the Task plugin, e.g. init, handle, cancel.

There are no close methods, so it's not convenient if we need to close some resource after the task plugin executes.

So it's needed to add Lifecycle interface to do this.

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Research direction

Start by locating the Java TaskPlugin interface and its existing init, handle, and cancel lifecycle implementations. Trace where task plugins are created and finished, then inspect related tests if available. Done means plugins can release resources after execution through a defined lifecycle method, with behavior covered for the affected execution paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.