<?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 Writing a UDF for Hive in JAVA: packages doe not exist in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-a-UDF-for-Hive-in-JAVA-packages-doe-not-exist/m-p/64009#M73878</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I am writing a UDF in JAVA that I want to use with HIVE. I like the description in this post&amp;nbsp;&lt;A href="http://www.bmc.com/blogs/how-to-write-a-hive-user-defined-function-udf-in-java/#" target="_blank"&gt;http://www.bmc.com/blogs/how-to-write-a-hive-user-defined-function-udf-in-java/#&lt;/A&gt; so that is what I am folowing.&lt;/P&gt;&lt;P&gt;The first lines of my function are :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package com.companyname.hive.udf;&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.Description;&lt;BR /&gt;import org.apache.hadoop.io.Text;&lt;/P&gt;&lt;P&gt;import java.math.BigInteger;&lt;/P&gt;&lt;P&gt;public final class FNV extends UDF{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Whan comping my function, I always get following errors:&lt;/P&gt;&lt;P&gt;package org.apache.hadoop.hive.ql.exec does not exist&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:5: package org.apache.hadoop.hive.ql.exec does not exist&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.Description;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:6: package org.apache.hadoop.io does not exist&lt;BR /&gt;import org.apache.hadoop.io.Text;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:10: cannot find symbol&lt;BR /&gt;symbol: class UDF&lt;BR /&gt;public final class FNV extends UDF{&lt;BR /&gt;^&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I find online, it seems that I should add the location of the jar files that are required (hadoop-core-1.2.1.jar and&amp;nbsp;hive-exec-0.13.0.jar) to the CLASSPATH (jars are in /home/user on my linux system):&lt;/P&gt;&lt;P&gt;export CLASSPATH=/home/user/&lt;SPAN&gt;hive-exec-0.13.0.jar:/home/user/hadoop-core-1.2.1.jar&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However after doing this, I still get the same errors.&lt;BR /&gt;&lt;BR /&gt;Any input would be greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:47:10 GMT</pubDate>
    <dc:creator>JB0000000000001</dc:creator>
    <dc:date>2022-09-16T12:47:10Z</dc:date>
    <item>
      <title>Writing a UDF for Hive in JAVA: packages doe not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-a-UDF-for-Hive-in-JAVA-packages-doe-not-exist/m-p/64009#M73878</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I am writing a UDF in JAVA that I want to use with HIVE. I like the description in this post&amp;nbsp;&lt;A href="http://www.bmc.com/blogs/how-to-write-a-hive-user-defined-function-udf-in-java/#" target="_blank"&gt;http://www.bmc.com/blogs/how-to-write-a-hive-user-defined-function-udf-in-java/#&lt;/A&gt; so that is what I am folowing.&lt;/P&gt;&lt;P&gt;The first lines of my function are :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package com.companyname.hive.udf;&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.Description;&lt;BR /&gt;import org.apache.hadoop.io.Text;&lt;/P&gt;&lt;P&gt;import java.math.BigInteger;&lt;/P&gt;&lt;P&gt;public final class FNV extends UDF{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Whan comping my function, I always get following errors:&lt;/P&gt;&lt;P&gt;package org.apache.hadoop.hive.ql.exec does not exist&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:5: package org.apache.hadoop.hive.ql.exec does not exist&lt;BR /&gt;import org.apache.hadoop.hive.ql.exec.Description;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:6: package org.apache.hadoop.io does not exist&lt;BR /&gt;import org.apache.hadoop.io.Text;&lt;BR /&gt;^&lt;BR /&gt;FNV.java:10: cannot find symbol&lt;BR /&gt;symbol: class UDF&lt;BR /&gt;public final class FNV extends UDF{&lt;BR /&gt;^&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I find online, it seems that I should add the location of the jar files that are required (hadoop-core-1.2.1.jar and&amp;nbsp;hive-exec-0.13.0.jar) to the CLASSPATH (jars are in /home/user on my linux system):&lt;/P&gt;&lt;P&gt;export CLASSPATH=/home/user/&lt;SPAN&gt;hive-exec-0.13.0.jar:/home/user/hadoop-core-1.2.1.jar&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However after doing this, I still get the same errors.&lt;BR /&gt;&lt;BR /&gt;Any input would be greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:47:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-a-UDF-for-Hive-in-JAVA-packages-doe-not-exist/m-p/64009#M73878</guid>
      <dc:creator>JB0000000000001</dc:creator>
      <dc:date>2022-09-16T12:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a UDF for Hive in JAVA: packages doe not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-a-UDF-for-Hive-in-JAVA-packages-doe-not-exist/m-p/64052#M73879</link>
      <description>&lt;P&gt;Note that this is solved. When I closed my shell and again executed the export CLASSPATH statement,&amp;nbsp;the error did not occur anymore.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 15:36:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-a-UDF-for-Hive-in-JAVA-packages-doe-not-exist/m-p/64052#M73879</guid>
      <dc:creator>JB0000000000001</dc:creator>
      <dc:date>2018-01-26T15:36:43Z</dc:date>
    </item>
  </channel>
</rss>

