You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hongshun Wang (Jira)" <ji...@apache.org> on 2024/08/09 08:56:00 UTC
[jira] [Created] (FLINK-36023) Flink K8S Native Application Mode add wrong jar url.
Hongshun Wang created FLINK-36023:
-------------------------------------
Summary: Flink 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
Reporter: Hongshun Wang
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)