[ 
https://issues.apache.org/jira/browse/FLINK-10771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681448#comment-16681448
 ] 

ASF GitHub Bot commented on FLINK-10771:
----------------------------------------

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:
us...@infra.apache.org


> Replace hard code of job graph file path with config option for 
> FileJobGraphRetriever
> -------------------------------------------------------------------------------------
>
>                 Key: FLINK-10771
>                 URL: https://issues.apache.org/jira/browse/FLINK-10771
>             Project: Flink
>          Issue Type: Improvement
>          Components: YARN
>            Reporter: vinoyang
>            Assignee: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> There is a config option to configure the value :
> {code:java}
> public static final ConfigOption<String> JOB_GRAPH_FILE_PATH = ConfigOptions
>    .key("internal.jobgraph-path")
>    .defaultValue("job.graph");
> {code}
> However, we used the default hard code in AbstractYarnClusterDescriptor. 
> This is just a preliminary refactoring, and I finally recommend that we use 
> Zookeeper-based storage. It has been implemented in FLINK-10292.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to