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/23 23:42:00 UTC

[jira] [Updated] (IMPALA-7668) close() URLClassLoaders after usage.

     [ https://issues.apache.org/jira/browse/IMPALA-7668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bharath v updated IMPALA-7668:
------------------------------
    Affects Version/s: Impala 3.1.0
                       Impala 2.12.0

> close() URLClassLoaders after usage.
> ------------------------------------
>
>                 Key: IMPALA-7668
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7668
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.12.0, Impala 3.1.0
>            Reporter: bharath v
>            Assignee: bharath v
>            Priority: Major
>             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