Skip to content

Commit

Permalink
[FLINK-10771] Replace hard code of job graph file path with config op…
Browse files Browse the repository at this point in the history
…tion for FileJobGraphRetriever

This closes apache#7054.
  • Loading branch information
yanghua authored and tillrohrmann committed Nov 9, 2018
1 parent 8442c16 commit fbfa246
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
import java.util.Set;

import static org.apache.flink.configuration.ConfigConstants.ENV_FLINK_LIB_DIR;
import static org.apache.flink.runtime.entrypoint.component.FileJobGraphRetriever.JOB_GRAPH_FILE_PATH;
import static org.apache.flink.yarn.cli.FlinkYarnSessionCli.CONFIG_FILE_LOG4J_NAME;
import static org.apache.flink.yarn.cli.FlinkYarnSessionCli.CONFIG_FILE_LOGBACK_NAME;
import static org.apache.flink.yarn.cli.FlinkYarnSessionCli.getDynamicProperties;
Expand Down Expand Up @@ -887,16 +888,19 @@ public ApplicationReport startAppMaster(
obOutput.writeObject(jobGraph);
}

final String jobGraphFilename = "job.graph";
flinkConfiguration.setString(JOB_GRAPH_FILE_PATH, jobGraphFilename);

Path pathFromYarnURL = setupSingleLocalResource(
"job.graph",
jobGraphFilename,
fs,
appId,
new Path(fp.toURI()),
localResources,
homeDir,
"");
paths.add(pathFromYarnURL);
classPathBuilder.append("job.graph").append(File.pathSeparator);
classPathBuilder.append(jobGraphFilename).append(File.pathSeparator);
} catch (Exception e) {
LOG.warn("Add job graph to local resource fail");
throw e;
Expand Down

0 comments on commit fbfa246

Please sign in to comment.