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

support connection properties #6

Open
zhuguangbin opened this issue Apr 18, 2020 · 1 comment
Open

support connection properties #6

zhuguangbin opened this issue Apr 18, 2020 · 1 comment

Comments

@zhuguangbin
Copy link

Hi,

flink-jdbc-driver does not support connection properties currently. Thus, SessionClient connected to flink-sql-gateway cannot change Environment at session level.

For example, In my senario, I deployed a flink sql gateway , I use beeline to connect it and submit flink sql query. The query always submit to that one Flink Cluster based on flink-sql-gateway's configuration. The execution configuration like time-characteristic/max-parallelism cannot change as well. This is tremendous inconvenience.

I looked through flink-sql-gateway code. Actually it support overriding deployment/execution/tableconfig params at session level.

POST http://localhost:8083/v1/sessions

{ "planner":"blink", "properties": { "deployment.jobmanager":"helloflinkonk8s.test.rest.shbt2.k8s.flink.ads.qihoo.net:80", "execution.parallelism": 1000, "execution.max-parallelism": 1000 } }

Then, I looked through flink-jdbc-drive code. It just ignore connection properties. I improved it, and now it works. I'm using beeline :

  • submitting to a remote flink cluster:

!connect jdbc:flink://localhost:8083?planner=blink&deployment.jobmanager=helloflinkonk8s.ultron:8081&execution.max-parallelism=1000

  • submitting to a yarn-session flink cluster:
    !connect jdbc:flink://localhost:8083?planner=blink&deployment.executor=yarn-session&deployment.yid=application_1574648431818_877975

  • submitting query for yarn-per-job mode:
    !connect jdbc:flink://localhost:8083?planner=blink&deployment.executor=yarn-per-job

@zhuguangbin
Copy link
Author

I submitted a pull request , pls review

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

1 participant