Unverified Commit 417c5b96 authored by gaoyan's avatar gaoyan Committed by GitHub

[Bug]fix flink 1.19 app mode (#3490)

parent 3c52eadf
...@@ -267,8 +267,11 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> { ...@@ -267,8 +267,11 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
} }
private String getDecodedJarPath() { private String getDecodedJarPath() {
final String encodedJarPath = final String encodedJarPath = YarnClusterClientFactory.class
getClass().getProtectionDomain().getCodeSource().getLocation().getPath(); .getProtectionDomain()
.getCodeSource()
.getLocation()
.getPath();
try { try {
return URLDecoder.decode(encodedJarPath, Charset.defaultCharset().name()); return URLDecoder.decode(encodedJarPath, Charset.defaultCharset().name());
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
......
...@@ -41,9 +41,7 @@ public class ClusterDescriptorAdapterImpl extends ClusterDescriptorAdapter { ...@@ -41,9 +41,7 @@ public class ClusterDescriptorAdapterImpl extends ClusterDescriptorAdapter {
@Override @Override
public void addShipFiles(List<File> shipFiles) { public void addShipFiles(List<File> shipFiles) {
yarnClusterDescriptor.addShipFiles(shipFiles.stream() yarnClusterDescriptor.addShipFiles(shipFiles.stream()
.map(file -> { .map(file -> new Path("file://" + file.getPath()))
return new Path(file.getPath());
})
.collect(Collectors.toList())); .collect(Collectors.toList()));
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<name>Dinky : Flink 1.19</name> <name>Dinky : Flink 1.19</name>
<properties> <properties>
<commons.version>1.3.1</commons.version> <commons.version>1.5.0</commons.version>
<flink.shaded.version>17.0</flink.shaded.version> <flink.shaded.version>17.0</flink.shaded.version>
<flink.version>1.19.0</flink.version> <flink.version>1.19.0</flink.version>
<flinkcdc.version>3.0.1</flinkcdc.version> <flinkcdc.version>3.0.1</flinkcdc.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment