Bostjan Bozic
08/14/2023, 8:04 AMFlinkDeployment. Once those JARs are used by FlinkSessionJob, they get duplicated with random hash in front of the name, which makes “Submit New Job” widget in GUI hard to navigate through. Is there an option for operator so that once I create FlinkSessionJob, that it does not create stand-alone JAR for each instance of job that is using this JAR?
Example of `FlinkSessionJob`:
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkSessionJob
metadata:
name: test
namespace: flink
spec:
deploymentName: flink-test
job:
jarURI: file:///data/uploads/flink-web-upload/84c65347-e334-4811-869f-8f4f0b85d698_flink-test-ingest-0.1.8-SNAPSHOT.jar
parallelism: 1
entryClass: at.test.flink.ingest.SimpleTestSqlForwardingJob
args:
- "-dataType"
- "test-10min"
- "-kafkaTopic"
- "test-10min"
- "-eventhubProperties"
- "/opt/flink/conf-extra/test-fanout.config"
- "-enableJsonValidation"
- "true"
- "-offset"
- "EARLIEST"
- "-kafkaGroupId"
- "test-10min-flink-consumer"
state: running
upgradeMode: savepoint
Once I upload JAR to Flink, I have only flink-test-ingest-0.1.8-SNAPSHOT.jar in GUI, but once I start the job, it also adds 84c65347-e334-4811-869f-8f4f0b85d698_flink-test-ingest-0.1.8-SNAPSHOT.jar JAR to GUI.
Also on the side note, maybe another question - is it possible that once you upload JAR to Flink, that it does not create random prefix for that JAR file locally? E.g. in my case, uploaded JAR local file name is actually 84c65347-e334-4811-869f-8f4f0b85d698_flink-test-ingest-0.1.8-SNAPSHOT.jar
And once I create a job from that JAR, it create another local file named <random_hash>_84c65347-e334-4811-869f-8f4f0b85d698_flink-test-ingest-0.1.8-SNAPSHOT.jar.
It is something I can live with, but it would be way cleaner if I can get rid of duplication there.Gyula FĂłra
08/14/2023, 8:12 AMjarURI field is not accessible on the session cluster so it has to upload it. Then it uploads it with a random prefix to avoid collision in case you are tring to submit 2 jobs with 2 different jars with the same nameGyula FĂłra
08/14/2023, 8:12 AMBostjan Bozic
08/14/2023, 8:13 AMFlinkSessionJob as well as into Flink cluster itself.Gyula FĂłra
08/14/2023, 8:13 AMBostjan Bozic
08/14/2023, 8:14 AMGyula FĂłra
08/14/2023, 8:14 AMGyula FĂłra
08/14/2023, 8:15 AMGyula FĂłra
08/14/2023, 8:16 AMGyula FĂłra
08/14/2023, 8:16 AMBostjan Bozic
08/14/2023, 8:21 AM84c65347-e334-4811-869f-8f4f0b85d698_flink-test-ingest-0.1.8-SNAPSHOT.jar, where 84c65347-e334-4811-869f-8f4f0b85d698 is uuid auto-generated by Flink during JAR upload. Would not that be sufficient?
Just for my understanding (since I am pretty new to this) - does operator actually upload JAR to session cluster once you create FlinkSessionJob? If that is the case, I understand what you are explaining to me yes. And I guess there is no way to say to operator - just use JAR that is “local” to session cluster right?Gyula Fóra
08/14/2023, 8:22 AMGyula FĂłra
08/14/2023, 8:22 AMGyula FĂłra
08/14/2023, 8:22 AMGyula FĂłra
08/14/2023, 8:24 AMSessionJob1:
jarURI: x
SessionJob2:
jarURI: x
you submit these 2 jobs with some time in between.
You have the same jarURI x, but you could have replaced the jar with a new one. The operator doesn’t really know so it has to upload it every time to guarantee that you get the latestBostjan Bozic
08/14/2023, 8:27 AMGyula FĂłra
08/14/2023, 8:33 AMGyula FĂłra
08/14/2023, 8:34 AMBostjan Bozic
08/14/2023, 8:36 AMGyula FĂłra
08/14/2023, 8:37 AMThen I uploaded JAR file to /jars/upload endpoint you were not using local files, you uploaded themGyula FĂłra
08/14/2023, 8:37 AMGyula FĂłra
08/14/2023, 8:38 AMBostjan Bozic
08/14/2023, 8:38 AMFlinkSessionJob specification 🙂Bostjan Bozic
08/14/2023, 8:39 AMBostjan Bozic
08/14/2023, 1:03 PMGyula FĂłra
08/14/2023, 1:04 PMBostjan Bozic
08/14/2023, 1:04 PMGyula FĂłra
08/14/2023, 1:05 PMGyula FĂłra
08/14/2023, 1:08 PMBostjan Bozic
08/14/2023, 1:08 PM