asfgit closed pull request #7054: [FLINK-10771] Replace hard code of job graph
file path with config option for FileJobGraphRetriever
URL: https://github.com/apache/flink/pull/7054
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
b/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
index 198eab7ea81..5ccc1306d41 100644
---
a/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
+++
b/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
@@ -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;
@@ -542,6 +543,8 @@ private void
validateClusterSpecification(ClusterSpecification clusterSpecificat
flinkConfiguration.setString(ClusterEntrypoint.EXECUTION_MODE,
executionMode.toString());
+ flinkConfiguration.setString(JOB_GRAPH_FILE_PATH, "job.graph");
+
ApplicationReport report = startAppMaster(
flinkConfiguration,
applicationName,
@@ -888,7 +891,7 @@ public ApplicationReport startAppMaster(
}
Path pathFromYarnURL = setupSingleLocalResource(
- "job.graph",
+
flinkConfiguration.getString(JOB_GRAPH_FILE_PATH),
fs,
appId,
new Path(fp.toURI()),
@@ -896,7 +899,7 @@ public ApplicationReport startAppMaster(
homeDir,
"");
paths.add(pathFromYarnURL);
-
classPathBuilder.append("job.graph").append(File.pathSeparator);
+
classPathBuilder.append(flinkConfiguration.getString(JOB_GRAPH_FILE_PATH)).append(File.pathSeparator);
} catch (Exception e) {
LOG.warn("Add job graph to local resource
fail");
throw e;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services