I wrote a custom UDF in java and packed in a jar file. Then, I added it in Hive using:
create temporary function isstopword as 'org.dennis.udf.IsStopWord';
Every thing worked fine. But, after I updated a small part in the UDF, I did the previous steps again, consequently Hive obviously still used old version UDF.
How can I refresh the updated version of UDF?
I tried to deleted the old jar file in hdfs, and drop the udf function with:
DROP TEMPORARY FUNCTION IF EXISTS isstopword;
Then recreate a new function with the same name, it still used the older version UDF.
I solved it by following this document:http://bdlabs.edureka.co/static/help/topics/cm_mc_hive_udf.html#concept_zb2_rxr_lw_unique_1
Generally with the following steps:
deleted the old jar file in HDFS, and upload the new jar file.
DROP TEMPORARY FUNCTION IF EXISTS isstopword;in hive console, run
list jar;to check the local jar files, it would print something like this:then delete them in your server file system.
With the above steps, it worked for me!