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 ha
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 java.util.UUID;
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;
import o
try
public class Uuid extends UDF{
On Thu, May 15, 2014 at 2:07 PM, Leena Gupta 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 java.util.UUI
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
wrote:
Follow the steps as it is from the link I shar
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 wrote:
> I added,
> package rishabh.udf.hive;
> in the above code.
> and repeated the steps.
> But Now getti
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 f
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 AS
'org.apache.hadoop.hive.ql.udf.';
feel free to use any package name you wish but mak
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 (STRI
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 wrote:
> 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<
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
hiveudfs/SimpleUDFExamp
Again. Suggest trapping exceptions with try/catch and return null. If
you initialize a logger with log4j or commons logging your can log the
event and find the failure information by clicking though the job
tracker web interface to drill down to the error.
On Wed, May 30, 2012 at 12:14 PM, pravee
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 this..
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 wrote:
> You should to try catch and return NULL o
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 wrote:
> Hello Hive Users,
>
> There
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
15 matches
Mail list logo