> On Oct. 23, 2014, 9:50 p.m., Jason Dere wrote: > > ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java, line 465 > > <https://reviews.apache.org/r/26854/diff/1-3/?file=723909#file723909line465> > > > > There is no longer a way to query the metastore for UDFs apart from the > > static initialization. So if one CLI user creates a permanent UDF, another > > user on CLI, or HS2, will not be able to use that new UDF if the 2nd CLI or > > HS2 was initialized before this UDF was created. > > Navis Ryu wrote: > Permanent functions (persistent function seemed better name, imho) are > registered to system registry, which is shared to all clients. So if one user > creates new permanent function, it's shared to all clients. The time a user > accesses the function, the class is loaded with required resources and > registered to session registry as a temporary function.
So this would work if all clients are using hiveserver2, because all clients in this scenario would share the same system registry. But if one or more clients are using the Hive CLI, any persistent UDFs created/dropped by this CLI client would not be reflected in the other clients (or HS2), since it's a different process/system registry. - Jason ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26854/#review57952 ----------------------------------------------------------- On Oct. 23, 2014, 12:20 a.m., Jason Dere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26854/ > ----------------------------------------------------------- > > (Updated Oct. 23, 2014, 12:20 a.m.) > > > Review request for hive, Navis Ryu and Thejas Nair. > > > Bugs: HIVE-2573 > https://issues.apache.org/jira/browse/HIVE-2573 > > > Repository: hive-git > > > Description > ------- > > Small updates to Navis' changes: > - session registry doesn't lookup metastore for UDFs > - my feedback from Navis' original patch > - metastore udfs should not be considered native. This allows them to be > added/removed from registry > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java 9ac540e > ql/src/java/org/apache/hadoop/hive/ql/exec/CommonFunctionInfo.java 93c15c0 > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionInfo.java 074255b > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 08e1136 > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java 569c125 > ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/exec/WindowFunctionInfo.java efecb05 > ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b900627 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/translator/SqlFunctionConverter.java > 31f906a > ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java > e43d39f > ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java > 22e5b47 > ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java af633cb > ql/src/test/org/apache/hadoop/hive/ql/parse/TestMacroSemanticAnalyzer.java > 46f8052 > ql/src/test/queries/clientnegative/drop_native_udf.q ae047bb > ql/src/test/results/clientnegative/create_function_nonexistent_class.q.out > c7405ed > ql/src/test/results/clientnegative/create_function_nonudf_class.q.out > d0dd50a > ql/src/test/results/clientnegative/drop_native_udf.q.out 9f0eaa5 > service/src/test/org/apache/hadoop/hive/service/TestHiveServerSessions.java > fd38907 > > Diff: https://reviews.apache.org/r/26854/diff/ > > > Testing > ------- > > > Thanks, > > Jason Dere > >
