In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the exception when Hive executes hive > select count (*) from tablename". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the exception when Hive executes hive > select count (*) from tablename.
Version description
Hadoop 1.0.3
HBase 0.94.1
Hive 0.9.0
Perform an operation
Hive > select count (*) from tablename
Abnormal hint
Exception in thread "Thread-54" java.lang.RuntimeException: Error while reading from task log url
At org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getStackTraces (TaskLogProcessor.java:240)
At org.apache.hadoop.hive.ql.exec.JobDebugger.showJobFailDebugInfo (JobDebugger.java:227)
At org.apache.hadoop.hive.ql.exec.JobDebugger.run (JobDebugger.java:92)
At java.lang.Thread.run (Thread.java:662)
Caused by: java.io.IOException: Server returned HTTP response code: 400for URL: http://slave3:50060/tasklog?taskid=attempt_201212192008_0014_m_000000_3&start=-8193
At sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1436)
At java.net.URL.openStream (URL.java:1010)
At org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getStackTraces (TaskLogProcessor.java:192)
... 3 more
Resolution steps
1. The path in the exception (based on your own exception URL address)
Http://slave3:50060/tasklog?taskid=attempt_201212192008_0014_m_000000_3&start=-8193
Modified to:
Http://slave3:50060/tasklog?attemptid=attempt_201212192008_0014_m_000000_3&start=-8193
Make an acc
two。 There are specific records of exceptions on the page. My exception hint at this point is:
Java.lang.NoClassDefFoundError: com/google/protobuf/Message
Some jar is obviously missing, and the jar can be found in the jar of HBase.
3. Put jar in the lib directory of Hive and modify the configuration file conf/hive-site.xml
(if you have previously integrated Hadoop,HBase,Hive, you will know that this is the jar that loads Hive and does not load 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 statistics command of Hive again, there may be exceptions, because my MapReduce has been used before and the jar of protobuf-java-2.4.0a.jar has been added to Hadoop. If you have not joined this jar under the lib of Hadoop before, there may also be exceptions. If there is an exception, you can still view the specific exception according to the method in the first step.
5. Special note: if Hadoop has not joined the jar before, join all the machines in the cluster to the jar, and restart Hadoop or restart MapReduce separately. Restart MapReduce as follows:
Stop-mapred.sh
Start-mapred.sh
At this point, I believe that everyone has a deeper understanding of "how to solve the exception when Hive executes hive > select count (*) from tablename". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.