Hive and HBase integration, query exception

Source: Internet
Author: User
Hive and HBase integration, query exception, re-execute the Hive statistical command, there may be exceptions, because my MapReduce has been used before, and has already added pro to Hadoop

Hive and HBase integration, query exception, re-execute the Hive statistical command, there may be exceptions, because my MapReduce has been used before, and has already added pro to Hadoop

Version description

Hadoop 1.0.3
HBase 0.94.1
Hive 0.9.0

Perform operations

Hive> select count (*) from tablename;

Exception prompt

Exception in thread "Thread-54" java. lang. RuntimeException: Error while reading from task log url

At org.apache.hadoop.hive.ql.exe c. errors. TaskLogProcessor. getStackTraces (TaskLogProcessor. java: 240)

At org.apache.hadoop.hive.ql.exe c. JobDebugger. showJobFailDebugInfo (JobDebugger. java: 227)

At org.apache.hadoop.hive.ql.exe c. JobDebugger. run (JobDebugger. java: 92)

At java. lang. Thread. run (Thread. java: 662)

Caused by: java. io. IOException: Server returned HTTP response code: 400 for URL: 50060/tasklog? Taskid = attempt_201212192008_0014_m_000000_3 & start =-8193

At sun.net. (HttpURLConnection. java: 1436)

At java.net. URL. openStream (URL. java: 1010)

At org.apache.hadoop.hive.ql.exe c. errors. TaskLogProcessor. getStackTraces (TaskLogProcessor. java: 192)

... 3 more

Solution

1. path in the exception (based on your own abnormal URL)

: 50060/tasklog? Taskid = attempt_201212192008_0014_m_000000_3 & start =-8193

To:

: 50060/tasklog? Attemptid = attempt_201212192008_0014_m_000000_3 & start =-8193

Access

2. There is an exception record on the page. The exception prompt is:

Java. lang. NoClassDefFoundError: com/google/protobuf/Message

Obviously a jar is missing, and this jar can find the protobuf-java-2.4.0a.jar in HBase's jar

3. Put the jar in the lib directory of Hive, modify the configuration file conf/hive-site.xml

(If you have integrated Hadoop, HBase, and Hive, you will know that Hive has not been loaded by default)



Hive. aux. jars. path

File: // usr/java/hive-0.9.0/lib/protobuf-java-2.4.0a.jar



4. if you execute the Hive statistical command again, there may be exceptions, because my MapReduce has been used before, and the protobuf-java-2.4.0a.jar jar has been added to Hadoop, if you have not added this jar file to the lib of Hadoop before, an exception may also occur. If an exception occurs, you can still view the exception in the first step.

5. Note: If Hadoop has not previously added this jar, add all the machines in the cluster to this jar, restart Hadoop, or separately restart MapReduce. Restart the MapReduce command as follows:

Stop-mapred.sh

Start-mapred.sh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.