解決hive+hbase整合的時候遇到問題記錄

版本:hive: 0.8.1 hbase:0.92.0 hadoop:1.0.0 java

錯誤信息相似以下: apache

 

Exception in thread "Thread-169" java.lang.RuntimeException: Error while reading from task log url  瀏覽器

        at org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getErrors(TaskLogProcessor.java:130) oop

        at org.apache.hadoop.hive.ql.exec.JobDebugger.showJobFailDebugInfo(JobDebugger.java:211)  ui

        at org.apache.hadoop.hive.ql.exec.JobDebugger.run(JobDebugger.java:81)  url

        at java.lang.Thread.run(Thread.java:662)  spa

Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://slaver1:50060/tasklog?taskid=attempt_201112211741_0005_m_000000_1&start=-8193  .net

        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)  日誌

        at java.net.URL.openStream(URL.java:1010)  code

        at org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getErrors(TaskLogProcessor.java:120)

        ... 3 more 

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask 

 

 

解決過程以下:

 

看錯誤日誌,url是:

 

http://slaver1:50060/tasklog?taskid=attempt_201112211741_0005_m_000000_1&start=-8193 

 

再看看HADOOP的源碼:TaskLogServlet 

 

 

 

    String attemptIdStr = request.getParameter("attemptid");

 

 if (attemptIdStr == null) {

 

      response.sendError(HttpServletResponse.SC_BAD_REQUEST, 

                         "Argument attemptid is required");

      return;

    }

因此taskid應該是attemptid ,應該是hadoop的版本不一致致使的。

 

而後在瀏覽器裏訪問:http://slaver1:50060/tasklog?attemptid=attempt_201112211741_0005_m_000000_1&start=-8193 

 

得到真正的錯誤信息,class not found 致使的,而後就好辦了,把對應的jar包扔到hadoop的lib .

stop-mapred.sh 

start-mapred.sh

搞定。

相關文章
相關標籤/搜索