<?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 not running with other user than HDFS in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132326#M43591</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/13744/rogeriobiondi.html"&gt;Rogerio Biondi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You added it only for the context of the user that you used when created the temporary function. If you want the function to be available for any user then create it as a permanent function (remove "temporary"):&lt;/P&gt;&lt;P&gt;add jar hdfs:/user/myuser/Test-0.0.1-SNAPSHOT.jar;&lt;/P&gt;&lt;P&gt;create function test as'Test';&lt;/P&gt;&lt;P&gt;This function will be available to all users until you restart Hive2 Server.&lt;/P&gt;&lt;P&gt;+++&lt;/P&gt;&lt;P&gt;Pls vote and accept best answer, if any.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2016 09:09:55 GMT</pubDate>
    <dc:creator>cstanca</dc:creator>
    <dc:date>2016-10-19T09:09:55Z</dc:date>
    <item>
      <title>Hive UDF not running with other user than HDFS</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132323#M43588</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the latest hortonworks release, plain installation and just created a simple UDF function for Hive:&lt;/P&gt;&lt;PRE&gt;import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.DoubleWritable;
@Description (
	name="test",
	value="returns the sum of two double values",
	extended="SELECT test(a, b) from foo limit 1;"
)

public class Test extends UDF {
	public DoubleWritable evaluate(DoubleWritable a, DoubleWritable b) {
        	return new DoubleWritable(a.get() + b.get());
	}
}&lt;/PRE&gt;&lt;P&gt;Then created the jar and uploaded to server.&lt;/P&gt;&lt;P&gt;Added the jar to hive and created the temporary function:&lt;/P&gt;&lt;PRE&gt;add jar hdfs:/user/myuser/Test-0.0.1-SNAPSHOT.jar;
create temporary function test as 'Test';&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;*** When I run this function with the "hdfs" user, it works PERFECT&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;But when I switch to another user (myuser) and do the same procedure above, receive the following error when running the UDF:&lt;/P&gt;&lt;PRE&gt;Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments '46.71': No matching method for class Test with (double, double). Possible choices:&lt;/PRE&gt;&lt;P&gt;Any idea why only hdfs user can run this UDF? Thank you very much.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rogerio Biondi&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 06:47:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132323#M43588</guid>
      <dc:creator>rogerio_biondi</dc:creator>
      <dc:date>2016-10-15T06:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF not running with other user than HDFS</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132324#M43589</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13744/rogeriobiondi.html" nodeid="13744"&gt;@Rogerio Biondi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13744/rogeriobiondi.html" nodeid="13744"&gt;&lt;/A&gt;What is the permission set on the UDF jar file ? &lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 23:36:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132324#M43589</guid>
      <dc:creator>grajagopal</dc:creator>
      <dc:date>2016-10-15T23:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF not running with other user than HDFS</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132325#M43590</link>
      <description>&lt;P&gt;Changed to 777 but the result is the same...&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 19:29:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132325#M43590</guid>
      <dc:creator>rogerio_biondi</dc:creator>
      <dc:date>2016-10-17T19:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF not running with other user than HDFS</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132326#M43591</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/13744/rogeriobiondi.html"&gt;Rogerio Biondi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You added it only for the context of the user that you used when created the temporary function. If you want the function to be available for any user then create it as a permanent function (remove "temporary"):&lt;/P&gt;&lt;P&gt;add jar hdfs:/user/myuser/Test-0.0.1-SNAPSHOT.jar;&lt;/P&gt;&lt;P&gt;create function test as'Test';&lt;/P&gt;&lt;P&gt;This function will be available to all users until you restart Hive2 Server.&lt;/P&gt;&lt;P&gt;+++&lt;/P&gt;&lt;P&gt;Pls vote and accept best answer, if any.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 09:09:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132326#M43591</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-10-19T09:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hive UDF not running with other user than HDFS</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132327#M43592</link>
      <description>&lt;P&gt;Your function is expecting two double parameters, your example is sending only one.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 02:29:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-UDF-not-running-with-other-user-than-HDFS/m-p/132327#M43592</guid>
      <dc:creator>robson_ximenes</dc:creator>
      <dc:date>2018-02-28T02:29:54Z</dc:date>
    </item>
  </channel>
</rss>

