try
public class Uuid extends UDF{
On Thu, May 15, 2014 at 2:07 PM, Leena Gupta gupta.le...@gmail.com wrote:
Hi,
I'm trying to create a function that generates a UUID, want to use it in a
query to insert data into another table.
Here is the function:
package com.udf.example;
import
What version of Hive are you running?
It looks like the error you're seeing might be from Hive trying to retrieve the
error message from the logs and might not be related to the actual error.
Might want to check the logs for the Hadoop task that was run as part of this
query, to see if that
Hi all,
I have done the following steps to create a UDF in hive but getting
error.Please help me.
1. Created the udf as described here.
2. Compiled it successfully.
3. Copy the class file to a directory hiveudfs.
4. Added it to a jar with this command: jar -cf hiveudfs.jar
Can you put first few lines of your code here or upload code on github and
share the link?
On Wed, Apr 9, 2014 at 11:59 AM, Rishabh Bhardwaj rbnex...@yahoo.comwrote:
Hi all,
I have done the following steps to create a UDF in hive but getting
error.Please help me.
1. Created the udf as
Hi Nitin,
Thanks for the concern.
Here is the code of the UDF,
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;
@Description(
name=SimpleUDFExample,
value=returns 'hello x', where x is whatever you give it
in your code and that code package is missing
what you need to do is
define package something like
package org.apache.hadoop.hive.ql.udf;
then your add function definition becomes
CREATE TEMPORARY FUNCTION function_name AS
'org.apache.hadoop.hive.ql.udf.ClassName';
feel free to use any
I added,
package rishabh.udf.hive;
in the above code.
and repeated the steps.
But Now getting the following error,
hive create temporary function helloworld as
'rishabh.udf.hive.SimpleUDFExample';
FAILED: Class rishabh.udf.hive.SimpleUDFExample not found
FAILED: Execution Error, return code 1
Follow the steps as it is from the link I shared .. it works
Somehow your package is getting messed and it is not able to find the class
On Wed, Apr 9, 2014 at 12:27 PM, Rishabh Bhardwaj rbnex...@yahoo.comwrote:
I added,
package rishabh.udf.hive;
in the above code.
and repeated the steps.
Thanks Nitin Its done now.
The problem was this that I have to store the class file in the sam directory
structure as I have described in package declaration line in the java code.
Rishabh
On Wednesday, 9 April 2014 12:43 PM, Nitin Pawar nitinpawar...@gmail.com
wrote:
Follow the steps as it
Hello Hive Users,
There is a strange situation I am facing.
I have a string column in my Hive table ( its IP address). I am creating a
UDF where I am taking this string column and converting it into Long value.
Its a simple UDF. Following is my code :
package com.practice.hive.udf;
public class
You should to try catch and return NULL on bad data. The issue is if
you have a single bad row the UDF will throw a exception up the chain.
It will try again, it will fail again, ultimately the job will fail.
On Wed, May 30, 2012 at 10:40 AM, praveenesh kumar praveen...@gmail.com wrote:
Hello
i won't tell the error but I would recommend to write a main function in
your udf and try with sample inputs which you are expecting in your query.
You will know whats the error you are committing
On Wed, May 30, 2012 at 8:14 PM, Edward Capriolo edlinuxg...@gmail.comwrote:
You should to try
I have done both the things.
There is no null issue here. Checked the nulls also. Sorry not mentioned in
the code.
I also have made a main function and called my evaluate function. If I am
passing a string, its working fine.
Problem is of numberformat exception.
Integer.parseInt is throwing
13 matches
Mail list logo