nrg4878 opened a new pull request #1590:
URL: https://github.com/apache/hive/pull/1590
### What changes were proposed in this pull request?
When you run the "compile" query in Hive CLI, this creates some temp files
in java.io.tmp directory that need to be cleaned up after the resource is added
to the session.
For example:
compile `import org.apache.hadoop.hive.ql.exec.UDF \;
public class Pyth extends UDF {
public double evaluate(double a, double b){
return Math.sqrt((a*a) + (b*b)) \;
}
} ` AS GROOVY NAMED Pyth.groovy;
in /tmp,
./0_1603130653872in/Pyth.groovy
./0_1603130393407in/Pyth.groovy
./0_1603130541093in/Pyth.groovy
ls -l *.jar
-rw-r--r-- 1 root root 1578 Oct 19 17:59 0_1603130393407.jar
-rw-r--r-- 1 hive hive 1578 Oct 19 18:02 0_1603130541093.jar
-rw-r--r-- 1 hive hive 1578 Oct 19 18:04 0_1603130653872.jar
### Why are the changes needed?
Cleanup needed
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
Manually using Hive CLI.
After the fix,
ls -l in /tmp, shows no new .groovy files
Also the jar file has lesser permissions for non-owners
-rw------- 1 root root 1578 Oct 20 00:54 2_1603155248285.jar
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]