fsilent commented on a change in pull request #1816:
URL: https://github.com/apache/hive/pull/1816#discussion_r553073159



##########
File path: 
spark-client/src/main/java/org/apache/hive/spark/client/AbstractSparkClient.java
##########
@@ -260,7 +265,7 @@ public void cancel(String jobId) {
     if (!properties.setReadable(false) || !properties.setReadable(true, true)) 
{
       throw new IOException("Cannot change permissions of job properties 
file.");
     }
-    properties.deleteOnExit();
+    sparkTmpProperties = properties;

Review comment:
       Test result like this:
   
   1. hive on spark task is running
   Queue | Application Priority | StartTime | FinishTime | State | FinalStatus 
| Running Containers
   -- | -- | -- | -- | -- | -- | --
   Hive on Spark (sessionId =   5e75b839-0a66-45c6-bc98-4ea14befc267) | SPARK | 
default | 0 | Thu Jan 7 09:52:31 +0800 2021 | Thu Jan 7 N/A | RUNNING
   
   2. spark tmp file in java.io.tmpdir(default is /tmp)
   root@xxxx tmp]# ll spark*
   -rw------- 1 xxx xxxx 37438 Jan  7 09:56 
spark-submit.2308482618955056124.properties
   
   3. beeline is finished
     
   Hive on Spark (sessionId =   6228c803-55be-4c2a-9868-3deae7c432c3) | SPARK | 
default | 0 | Thu Jan 7 09:52:31 +0800 2021 | Thu Jan 7 09:54:04 +0800 2021 | 
FINISHED | SUCCEEDED
   
   4. spark tmp file was deleted
   [root@xxxx tmp]# ll spark*
   ls: cannot access spark*: No such file or directory
   
   5. if use kill -9 beeline pid, also can delete spark tmp file
   
   
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to