zoukankan      html  css  js  c++  java
  • hive udaf 用maven打包运行create temporary function 时报错


    用maven打包写好的jar,在放到hive中作暂时函数时报错。


    错误信息例如以下:

    hive> create temporary function maxvalue as "com.leaf.data.Maximum";
    java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
            at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:240)
            at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)
            at java.util.jar.JarVerifier.processEntry(JarVerifier.java:305)
            at java.util.jar.JarVerifier.update(JarVerifier.java:216)
            at java.util.jar.JarFile.initializeVerifier(JarFile.java:341)
            at java.util.jar.JarFile.getInputStream(JarFile.java:406)
            at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:752)
            at sun.misc.Resource.cachedInputStream(Resource.java:77)
            at sun.misc.Resource.getByteBuffer(Resource.java:160)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:264)
            at org.apache.hadoop.hive.ql.exec.FunctionTask.getUdfClass(FunctionTask.java:137)
            at org.apache.hadoop.hive.ql.exec.FunctionTask.createFunction(FunctionTask.java:87)
            at org.apache.hadoop.hive.ql.exec.FunctionTask.execute(FunctionTask.java:65)
            at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
            at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
            at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1414)
            at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1192)
            at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1020)
            at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
            at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
            at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
            at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
            at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
            at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
            at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
    FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.FunctionTask

    此异常像是Manifest文件相关的错。

    解决方法:

    在jar包找到META-INF文件夹。删除掉以.SF结尾的文件就可以。例如以下图:










  • 相关阅读:
    Xhprof分析php性能
    Xhprof graphviz Warning: proc_open() [function.proc-open]: CreateProcess failed, error code 解决方法
    使用xhprof会在nginx下报502 Bad Gateway错误
    springbooot2 thymeleaf 配置以及加载资源文件。Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
    springboot用户登陆密码两次md5加密
    SpringBoot2.0 redis生成组建和读写配置文件
    spring2.0:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either th
    SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe
    秋季学期总结
    寒假作业3:抓老鼠啊~亏了还是赚了?
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/5193712.html
Copyright © 2011-2022 走看看