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

[SUB-TASK][KPIP-2] Support Flink SQL Client startup options. #2153

Open
3 tasks done
a49a opened this issue Mar 16, 2022 · 7 comments
Open
3 tasks done

[SUB-TASK][KPIP-2] Support Flink SQL Client startup options. #2153

a49a opened this issue Mar 16, 2022 · 7 comments

Comments

@a49a
Copy link
Contributor

a49a commented Mar 16, 2022

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

What would you like to be improved?

The following issue only achieves FlinkSQLEngine process, but users have no way to set --jar and --library options in Kyuubi. We should achieve this in KyuubiServer process too.

#1685
SteNicholas@dd5a704

We can put --jar and --library options in kyuuubi-default.conf, and KyuubiServer process load these options.

How should we improve?

KyuubiServer process loads the Flink SQL Client startup options in kyuuubi-default.conf. And then KyuubiServer transforms the options to standard Flink SQL Client startup options and passes them to flink-sql-engine.sh when the flink-sql-engine.sh process will be started.

The kyuuubi-default.conf options like the following.

flink.client.option.jar foo.jar
flink.client.option.library /foo/bar

Now flink-sql-engine.sh startup options are nothing, so users can't set any options.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@a49a
Copy link
Contributor Author

a49a commented Mar 16, 2022

The FlinkSQLEngine process life is inconsistent with Session. One FlinkSQLEngine process corresponds to multiple sessions. So flink-sql-engine.sh can not use configuration of Session or ExecuteStatement.

@pan3793
Copy link
Member

pan3793 commented Mar 19, 2022

The FlinkSQLEngine process life is inconsistent with Session. One FlinkSQLEngine process corresponds to multiple sessions. So flink-sql-engine.sh can not use configuration of Session or ExecuteStatement.

From Flink document, Flink support ADD JAR and REMOVE JAR commands, what's the difference between use ADD JAR and inject jars on launching Flink engine?

@pan3793
Copy link
Member

pan3793 commented Mar 19, 2022

The kyuuubi-default.conf options like the following.

flink.client.option.jar foo.jar
flink.client.option.library /foo/bar

Give some comments based on my little understand of Flink, please correct me if I'm wrong.

There is no equality configuration in Flink of --jar and --library options defined by Flink CLI, if yes we'd better to introduce Kyuubi's style configurations instead of Flink's style to avoid potential conflict, e.g.

kyuubi.session.engine.flink.jar
kyuubi.session.engine.flink.library

@pan3793
Copy link
Member

pan3793 commented Mar 19, 2022

https://github.com/apache/incubator-kyuubi/blob/3eb1fa9e48b4c533f05b3719486df198c6e29751/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala#L79

BTW, I think we can modify this line to support overwriting Flink configuration by flink-sql-engine.sh, then we can achieve same experience like Spark engine, which means we can define Flink confs in JDBC URL, kyuubi-defaults.conf, flink-conf.yaml, and the former has higher priority.

@a49a
Copy link
Contributor Author

a49a commented Mar 23, 2022

https://github.com/apache/incubator-kyuubi/blob/3eb1fa9e48b4c533f05b3719486df198c6e29751/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala#L79

BTW, I think we can modify this line to support overwriting Flink configuration by flink-sql-engine.sh, then we can achieve same experience like Spark engine, which means we can define Flink confs in JDBC URL, kyuubi-defaults.conf, flink-conf.yaml, and the former has higher priority.

I spilled a new issue, I will achieve this first.

@a49a
Copy link
Contributor Author

a49a commented Mar 23, 2022

The kyuuubi-default.conf options like the following.

flink.client.option.jar foo.jar
flink.client.option.library /foo/bar

Give some comments based on my little understand of Flink, please correct me if I'm wrong.

There is no equality configuration in Flink of --jar and --library options defined by Flink CLI, if yes we'd better to introduce Kyuubi's style configurations instead of Flink's style to avoid potential conflict, e.g.

kyuubi.session.engine.flink.jar
kyuubi.session.engine.flink.library

I second with introducing Kyuubi's style configurations, but this has nothing to do with session.

Could we design prefix is kyuubi.engine.flink.?

kyuubi.engine.flink.jar
kyuubi.engine.flink.library

@a49a
Copy link
Contributor Author

a49a commented Apr 2, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants