hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopal V (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-22161) UDF: FunctionRegistry should cache statefulness of UDF
Date Fri, 30 Aug 2019 16:43:00 GMT

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

Gopal V reassigned HIVE-22161:
------------------------------

    Assignee: Gopal V

> UDF: FunctionRegistry should cache statefulness of UDF
> ------------------------------------------------------
>
>                 Key: HIVE-22161
>                 URL: https://issues.apache.org/jira/browse/HIVE-22161
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Gopal V
>            Assignee: Gopal V
>            Priority: Major
>
> There's a hidden synchronization across threads when looking up isStateful and isDeterministic.
> https://github.com/apache/hive/blob/master/common/src/java/org/apache/hive/common/util/AnnotationUtils.java#L27
> {code}
>   // to avoid https://bugs.openjdk.java.net/browse/JDK-7122142
>   public static <T extends Annotation> T getAnnotation(Class<?> clazz, Class<T>
annotationClass) {
>     synchronized (annotationClass) {
>       return clazz.getAnnotation(annotationClass);
>     }
>   }
> {code}
> This is serializing multiple threads initializing UDFs (or checking them during compilation)
& also being locked across threads for each instance of GenericUDFOpEqual in the specific
scenario.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message