[
https://issues.apache.org/jira/browse/FLINK-36023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872264#comment-17872264
]
Hongshun Wang commented on FLINK-36023:
---------------------------------------
I'd like to do it.
> Flink CDC K8S Native Application Mode add wrong jar url.
> --------------------------------------------------------
>
> Key: FLINK-36023
> URL: https://issues.apache.org/jira/browse/FLINK-36023
> Project: Flink
> Issue Type: Improvement
> Components: Flink CDC
> Affects Versions: cdc-3.1.1
> Reporter: Hongshun Wang
> Priority: Major
> Fix For: cdc-3.2.0
>
>
> In https://issues.apache.org/jira/browse/FLINK-34853 , a great job made to
> summit CDC Job in Flink K8S Native Application Mode.However, some change
> will occur problem:
> # if user summit job not in Flink K8S Native Application Mode, and put jar
> in /mypackage/usrlib will be casted to &\{FLINK_HOME}/usrlib.
> # if user summit job in Flink K8S Native Application Mode , jar in
> local://usrlib have already been added to classpath of JM and TM, thus no
> need to add jar anymore.
>
> {code:java}
> public static <T extends Factory> Optional<URL> getJarPathByIdentifier(
> String identifier, Class<T> factoryClass) {
> try {
> ...
> if (urlString.contains("usrlib")) {
> String flinkHome = System.getenv("FLINK_HOME");
> urlString = urlString.replace("usrlib", flinkHome +
> "/usrlib");
> }
> ....
> }
> return Optional.of(url);
> } catch (Exception e) {
> throw new RuntimeException(
> String.format("Failed to search JAR by factory identifier
> \"%s\"", identifier),
> e);
> }
> }
> }
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)