You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "bharath v (JIRA)" <ji...@apache.org> on 2018/10/05 06:47:00 UTC
[jira] [Created] (IMPALA-7668) close() URLClassLoaders after usage.
bharath v created IMPALA-7668:
---------------------------------
Summary: close() URLClassLoaders after usage.
Key: IMPALA-7668
URL: https://issues.apache.org/jira/browse/IMPALA-7668
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: bharath v
Assignee: bharath v
Fix For: Impala 3.1.0
There are a few places in the code that uses URLClassLoaders to load some java classes at runtime. One example is when loading Java UDFs at startup.
{code:java}
public static List<Function> extractFunctions(String db,
...........
URL[] classLoaderUrls = new URL[] {new URL(localJarPath.toString())};
URLClassLoader urlClassLoader = new URLClassLoader(classLoaderUrls);
{code}
Starting JDK7, URLClassloader lets the caller close all the closeables opened by it, avoiding bugs like FD leaks etc.
https://docs.oracle.com/javase/7/docs/api/java/net/URLClassLoader.html#close()
We have seen issues like lingering FDs from this code using certain versions of JDKs where the FDs of temporary jars (copied to /tmp) by this code are not closed and hence their space from disk is not claimed causing disk space issues.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org