Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-16699][Task Plugin] Flink submit option parameter supports placeholder substitution #16703

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

hanhanzhang
Copy link

@hanhanzhang hanhanzhang commented Oct 17, 2024

Purpose of the pull request

Flink submit option parameter supports placeholder substitution

close #16699

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

Copy link

boring-cyborg bot commented Oct 17, 2024

Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some docs. @hanhanzhang

@SbloodyS SbloodyS added the miss:docs missing documents in PR label Oct 21, 2024
@SbloodyS SbloodyS added this to the 3.3.0 milestone Oct 21, 2024
Copy link

sonarcloud bot commented Oct 21, 2024

@hanhanzhang
Copy link
Author

Please add some docs. @hanhanzhang

ok, can you guide me on how to add doc?

@SbloodyS
Copy link
Member

@@ -37,7 +37,7 @@ Flink task type, used to execute Flink programs. For Flink nodes:
| Parallelism | Used to set the degree of parallelism for executing Flink tasks. |
| Yarn queue | Used to set the yarn queue, use `default` queue by default. |
| Main program parameters | Set the input parameters for the Flink program and support the substitution of custom parameter variables. |
| Optional parameters | Set the flink command options, such as `-D`, `-C`, `-yt`. |
| Optional parameters | Set the flink command options, such as `-D`, `-C`, `-yt`, and support the substitution of custom parameter variables. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some examples of how to use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok,I have added examples.

@@ -37,7 +37,7 @@ Flink task type, used to execute Flink programs. For Flink nodes:
| Parallelism | Used to set the degree of parallelism for executing Flink tasks. |
| Yarn queue | Used to set the yarn queue, use `default` queue by default. |
| Main program parameters | Set the input parameters for the Flink program and support the substitution of custom parameter variables. |
| Optional parameters | Set the flink command options, such as `-D`, `-C`, `-yt`. |
| Optional parameters | Set the flink command options, such as `-D`, `-C`, `-yt`, and support the substitution of custom parameter variables, such as `-Dyarn.application.name=${job_name}` custom parameter job _name will be replaced. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this custom parameter job_name setting by users with hard code? If so, this is meaningless. We should add separate field options for users to use instead of using custom parameters, which are suitable for parameter passing and global parameters.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not hard-coded, user custom parameter pass and replace, like main program parameters:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said that Custom parameters are suitable for parameter passing between tasks in a workflow and global parameters. yarn.application.name is a parameter of task level with different functions. We should not add it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand boundary with custom parameters, option parameter replacement is also specific to Flink Task.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

option parameter replacement is also specific to Flink Task.

I don't think we should confuse usage of custom parameters with task parameters. Sorry, I'm -1 on this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understand your idea, but i have a question: custom parameters can't be used as task parameters? Now flink task main parameters can be replaced with custom parameters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understand your idea, but i have a question: custom parameters can't be used as task parameters? Now flink task main parameters can be replaced with custom parameters.

I didn't say that custom parameters can't be used as task parameters. What I mean is job_name should be added into task parameters instead of custom parameters.

After take a look at dev branch, I found that the job_name already exists in task params right now with org.apache.dolphinscheduler.plugin.task.flink.FlinkParameters#appName. But it is only used in flink sql. We can just simpliy add it to the flink jar mode. And this issue can be easily solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend document feature new feature first time contributor First-time contributor miss:docs missing documents in PR test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Task Plugin] Flink submit option parameter supports placeholder substitution
2 participants