zoukankan      html  css  js  c++  java
  • java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

    执行Hive查询:

    Console是这样报错的

    java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
    at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:392)
    at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
    at Test.GetInfo.GaobaoSaleInfoWithAnjuke(GetInfo.java:525)
    at Test.GetInfo.main(GetInfo.java:1708)
    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:606)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
    java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
    at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:392)
    at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
    at Test.GetInfo.GaobaoRentInfoWithAnjuke(GetInfo.java:724)
    at Test.GetInfo.main(GetInfo.java:1709)
    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:606)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
    java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
    at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:392)
    at org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
    at Test.GetInfo.GaobaoSaleInfoWithGanji(GetInfo.java:1312)
    at Test.GetInfo.main(GetInfo.java:1710)
    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:606)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)

    如果把同样的sql放到hive shell里面执行

    FAILED
    java.io.IOException: Rename cannot overwrite non empty destination directory /mnt/glusterfs/HadoopVol/hadoop/yarn/local/filecache/13

    报错是上面这样的

    一般出现这种情况,你去filecache 下面去找这个目录,是找不到的

    原因可能是硬盘或者网络等原因 导致这个目录没有写入进去,删除filecache下面的所有文件夹,重启yarn 即可

    重启之后你就会发现 filecache这个目录会重新创建,但是是空的,你运行MR的时候会对应重新创建  所以你担心的filecache删除了后面解决不了会不会有影响  不放心的话,你给他备份一样,你重启之后还是没有的 除非你不放在这个目录

    重启yarn之后解决  !

    2016年12月23日11:43:18

  • 相关阅读:
    小程序云开发学习笔记
    188.gulp创建任务
    187.gulp介绍和安装
    186.npm使用详解
    185.nvm和node.js环境配置
    171.补充-在模板中添加权限控制
    170.分组-group、permission、user的操作
    内置中间件CommonMiddleware
    Django内置的中间件
    144.中间件的原理和定义方式详解
  • 原文地址:https://www.cnblogs.com/tnsay/p/6214246.html
Copyright © 2011-2022 走看看