abstractdog commented on code in PR #523:
URL: https://github.com/apache/tez/pull/523#discussion_r3595768636


##########
tez-api/src/main/java/org/apache/tez/client/TezClient.java:
##########
@@ -692,7 +692,9 @@ private DAGClient submitDAGSession(DAG dag) throws 
TezException, IOException {
           serializedSubmitDAGPlanRequestCounter.incrementAndGet());
 
       FileSystem fs = dagPlanPath.getFileSystem(stagingFs.getConf());
-      try (FSDataOutputStream fsDataOutputStream = fs.create(dagPlanPath, 
false)) {
+      // Overwrite a possible leftover plan file: when the session outlives 
the TezClient instances,
+      // a file with the same name may have been left behind by an already 
consumed submission.

Review Comment:
   "left behind by an already consumed submission." is this true?
   with the new finally block introduced in the AM-side server, we can make 
sure that if it's consumed, it's deleted, right?
   btw, I don't mind if we take care of this in two places (like: overwrite + 
delete in finally), it just doesn't seem 100% accurate to say that a consumed 
file could be left behind



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to