Skip to content

Commit 49159c7

Browse files
committed
fix
1 parent 90a7755 commit 49159c7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

launcher/src/main/java/com/dtstack/flink/sql/launcher/perjob/PerJobClusterClientBuilder.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* to you under the Apache License, Version 2.0 (the
77
* "License"); you may not use this file except in compliance
88
* with the License. You may obtain a copy of the License at
9-
*
9+
* <p>
1010
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
11+
* <p>
1212
* Unless required by applicable law or agreed to in writing, software
1313
* distributed under the License is distributed on an "AS IS" BASIS,
1414
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@ public class PerJobClusterClientBuilder {
6767

6868
public void init(String yarnConfDir, Configuration flinkConfig, Properties userConf) throws Exception {
6969

70-
if(Strings.isNullOrEmpty(yarnConfDir)) {
70+
if (Strings.isNullOrEmpty(yarnConfDir)) {
7171
throw new RuntimeException("parameters of yarn is required");
7272
}
7373
userConf.forEach((key, val) -> flinkConfig.setString(key.toString(), val.toString()));
@@ -79,8 +79,7 @@ public void init(String yarnConfDir, Configuration flinkConfig, Properties userC
7979
yarnClient.init(yarnConf);
8080
yarnClient.start();
8181

82-
System.out.println("----init yarn success ----");
83-
// LOG.info("----init yarn success ----");
82+
LOG.info("----init yarn success ----");
8483
}
8584

8685
public AbstractYarnClusterDescriptor createPerJobClusterDescriptor(String flinkJarPath, Options launcherOptions, JobGraph jobGraph)
@@ -131,8 +130,8 @@ public AbstractYarnClusterDescriptor createPerJobClusterDescriptor(String flinkJ
131130

132131
private static void fillJobGraphClassPath(JobGraph jobGraph) throws MalformedURLException {
133132
Map<String, DistributedCache.DistributedCacheEntry> jobCacheFileConfig = jobGraph.getUserArtifacts();
134-
for(Map.Entry<String, DistributedCache.DistributedCacheEntry> tmp : jobCacheFileConfig.entrySet()){
135-
if(tmp.getKey().startsWith("class_path")){
133+
for (Map.Entry<String, DistributedCache.DistributedCacheEntry> tmp : jobCacheFileConfig.entrySet()) {
134+
if (tmp.getKey().startsWith("class_path")) {
136135
jobGraph.getClasspaths().add(new URL("file:" + tmp.getValue().filePath));
137136
}
138137
}
@@ -141,8 +140,8 @@ private static void fillJobGraphClassPath(JobGraph jobGraph) throws MalformedURL
141140
private List<File> getPluginPathToShipFiles(JobGraph jobGraph) {
142141
List<File> shipFiles = new ArrayList<>();
143142
Map<String, DistributedCache.DistributedCacheEntry> jobCacheFileConfig = jobGraph.getUserArtifacts();
144-
for(Map.Entry<String, DistributedCache.DistributedCacheEntry> tmp : jobCacheFileConfig.entrySet()){
145-
if(tmp.getKey().startsWith("class_path")){
143+
for (Map.Entry<String, DistributedCache.DistributedCacheEntry> tmp : jobCacheFileConfig.entrySet()) {
144+
if (tmp.getKey().startsWith("class_path")) {
146145
shipFiles.add(new File(tmp.getValue().filePath));
147146
}
148147
}

0 commit comments

Comments
 (0)