1

I write a UDF as flow:

  package com.test;
    import org.apache.hadoop.hive.ql.exec.UDF;
    import org.apache.hadoop.io.Text;

    public class Lower extends UDF {
        public Text evaluate(final Text s) {
            if (s == null) {
                return null;
            }
            return new Text(s.toString().toLowerCase());
        }
    }

then I export a jar(udftest.jar) of this test project by eclipse. After that I add jar udftest.jar in hive:

hive command: add jar udftest.jar;   
hive command: create temporary function my_lower as 'com.test.Lower';
hive command: Executing command:  create temporary function my_lower as 'com.test.Lower'

Execution Failed!

Failed: Error occurred during execution.
Detail message: FAILED: Execution Error, return code [-101] (unknow error) from org.apache.hadoop.hive.ql.exec.FunctionTask

I don't know why! I search the internet but not deal with this problem!

2
  • were you able to add jar successfully? Commented Dec 8, 2014 at 10:27
  • @RajenRaiyarela Yes, I can add jar file. Commented Dec 8, 2014 at 10:51

1 Answer 1

1

I find why I can't create temporary function(it had bothered for days!): because the Java version I used is 1.7, but the hive only support 1.6!!!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.