<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hive UDF --Class Not Found Error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224006#M79697</link>
    <description>&lt;P&gt;That worked! Thanks a lot Sir!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jun 2018 08:05:16 GMT</pubDate>
    <dc:creator>abhijnan_kundu</dc:creator>
    <dc:date>2018-06-20T08:05:16Z</dc:date>
    <item>
      <title>Hive UDF --Class Not Found Error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224004#M79695</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;Can anyone please help me with below error?&lt;/P&gt;&lt;P&gt;I am writing a small code to understand how UDF works. The java code is as below:&lt;/P&gt;&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;package UDF;&lt;BR /&gt;&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;BR /&gt;import org.apache.hadoop.io.Text;&lt;BR /&gt;&lt;BR /&gt;@SuppressWarnings("deprecation")&lt;BR /&gt;public class MyUpper extends UDF{&lt;BR /&gt;&lt;BR /&gt;  public Text evaluate(final Text s){&lt;BR /&gt;    if (s==null){return null;}&lt;BR /&gt;    return new Text(s.toString().toUpperCase());&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;//Class path of above class is: &lt;STRONG&gt;/Hive/src/UDF/MyUpper.java&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;I have created a jar file for this class as test.jar and added the jar in hive.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;hive&amp;gt; ADD JAR test.jar;&lt;BR /&gt;Added [test.jar] to class path&lt;BR /&gt;Added resources: [test.jar]&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;Now I am trying to create a temporary function upper by typecasting the java function MyUpper. Below is my command.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;create temporary function upper as 'Hive/src/UDF/MyUpper.java';&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;or I have tried below command also.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;create temporary function upper as 'Hive/src/UDF/MyUpper.java';&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;Both the commands above is giving me error as below:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;FAILED: Class Hive.src.UDF.MyUpper.java not found&lt;BR /&gt;FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Jun 2018 08:36:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224004#M79695</guid>
      <dc:creator>abhijnan_kundu</dc:creator>
      <dc:date>2018-06-19T08:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF --Class Not Found Error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224005#M79696</link>
      <description>&lt;P&gt;Hey &lt;A rel="user" href="https://community.cloudera.com/users/70304/abhijnankundu.html" nodeid="70304"&gt;@Abhijnan Kundu&lt;/A&gt;!&lt;BR /&gt;Did you tried to create like this?&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;CREATE TEMPORARY FUNCTION myupper as 'udf.myupper';&lt;/PRE&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:31:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224005#M79696</guid>
      <dc:creator>vmurakami</dc:creator>
      <dc:date>2018-06-19T09:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF --Class Not Found Error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224006#M79697</link>
      <description>&lt;P&gt;That worked! Thanks a lot Sir!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 08:05:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224006#M79697</guid>
      <dc:creator>abhijnan_kundu</dc:creator>
      <dc:date>2018-06-20T08:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF --Class Not Found Error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224007#M79698</link>
      <description>&lt;P&gt;You're welcome! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 08:38:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-Class-Not-Found-Error/m-p/224007#M79698</guid>
      <dc:creator>vmurakami</dc:creator>
      <dc:date>2018-06-20T08:38:08Z</dc:date>
    </item>
  </channel>
</rss>

