IMPALA-3983/ IMPALA-3974: Delete function jar resources after load
The Catalog copies the UDF jar files to the local file system to
load the Java UDF classes for validation purposes. However we
do not clean them up after the UDF load and hence on a deployment
with large number of functions registered, these jar can accumulate
over a period of time and can fill up the tmp space. We fix it by
deleting the jar resource once the function is loaded.
Also, this patch switches to --local_library_dir for copying these
temporary jars instead of using the path from java.io.tmpdir.
Reviewed-by: Bharath Vissapragada <firstname.lastname@example.org>
Tested-by: Internal Jenkins