flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [44/52] [abbrv] flink git commit: [FLINK-4930] [client] [yarn] delete tmp file of job graph and refine finalizeCluster
Date Fri, 23 Dec 2016 20:23:03 GMT
[FLINK-4930] [client] [yarn] delete tmp file of job graph and refine finalizeCluster


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/afa27175
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/afa27175
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/afa27175

Branch: refs/heads/master
Commit: afa271756036c668924aac41f5786efc2118717e
Parents: 3695a8e
Author: shuai.xus <shuai.xus@alibaba-inc.com>
Authored: Thu Nov 24 16:58:14 2016 +0800
Committer: Stephan Ewen <sewen@apache.org>
Committed: Fri Dec 23 20:54:27 2016 +0100

----------------------------------------------------------------------
 .../org/apache/flink/yarn/AbstractYarnClusterDescriptor.java    | 5 +++--
 .../main/java/org/apache/flink/yarn/YarnClusterClientV2.java    | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/afa27175/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
----------------------------------------------------------------------
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 b4c87b8..0d1239d 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
@@ -716,10 +716,11 @@ public abstract class AbstractYarnClusterDescriptor implements ClusterDescriptor
 		classPathBuilder.append("flink-conf.yaml").append(File.pathSeparator);
 
 		// write job graph to tmp file and add it to local resource 
-		// TODO: need refine ?
+		// TODO: server use user main method to generate job graph 
 		if (jobGraph != null) {
 			try {
-				File fp = new File("/tmp/jobgraph-" + appId.toString());
+				File fp = File.createTempFile(appId.toString(), null);
+				fp.deleteOnExit();
 				FileOutputStream input = new FileOutputStream(fp);
 				ObjectOutputStream obInput = new ObjectOutputStream(input);
 				obInput.writeObject(jobGraph);

http://git-wip-us.apache.org/repos/asf/flink/blob/afa27175/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterClientV2.java
----------------------------------------------------------------------
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterClientV2.java b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterClientV2.java
index daa2c3b..e9c6636 100644
--- a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterClientV2.java
+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterClientV2.java
@@ -143,7 +143,7 @@ public class YarnClusterClientV2 extends ClusterClient {
 
 	@Override
 	public void finalizeCluster() {
-		throw new UnsupportedOperationException("Not support finalizeCluster since Flip-6.");
+		// Do nothing
 	}
 
 	@Override


Mime
View raw message