執行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