java - HIVE:执行错误,从 org.apache.hadoop.hive.ql.exec.FunctionTask 返回代码 [-101](未知错误)

标签 java sql hadoop hive excel-udf

我写一个 UDF 作为流:

  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());
        }
    }

然后我通过eclipse导出这个测试项目的jar(udftest.jar)。 之后,我在配置单元中添加 jar udftest.jar:

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'

执行失败!

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

不知道为什么!我在网上搜索但没有处理这个问题!

最佳答案

我找到了为什么我不能创建临时函数(困扰了好几天!):因为我使用的 Java 版本是 1.7,但是 hive 只支持 1.6!!!

关于java - HIVE:执行错误,从 org.apache.hadoop.hive.ql.exec.FunctionTask 返回代码 [-101](未知错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27353418/

相关文章:

java - 在二维数组的末尾添加新列

java - 从命令提示符转变为 Netbeans

mysql - 是否可以使用mysql编辑联合表中的数据排序?

sql - 如何将外键约束添加到表 A (id, type) 引用两个表表 B (id, type) 或表 C (id, 类型) 中的任何一个?

sql - 使用VB写入大量记录 Access

Hadoop:拆分元数据大小超过 10000000

java - Spring MVC - @ModelAttribute 长类型

java - Spring MVC + Thymeleaf : adding variable to all templates' context

sql - Hive中哪一个更快? “in”或 “or”?

hadoop - 无法开始mapreduce作业