Reply
New Contributor
Posts: 3
Registered: ‎03-27-2018

Mapreduce error by a Hive - Webhcat job

[ Edited ]

hello community, my version is cdh5.11.1,  I'm trying to execute a Hive query by webhcat for a REST service,

 

 

curl -s -d execute="select+*+from+sample_08;" -d 
statusdir="/user/root/output"
'http://localhost:50111/templeton/v1/hive?user.name=root'

 

 

but the mapreduce produces the following error:

 

27-03-2018 03-36-21 p-m-.png

 

I see that it is a library error, but I can not find a way to fix i.

 

Sorry for my bad english,Thanks for the help

Cloudera Employee
Posts: 430
Registered: ‎03-23-2015

Re: Mapreduce error by a Hive - Webhcat job

LogUtils should be in the hive-common.jar or hive-common-1.1.0-cdh5.11.1.jar file, is the jar file in the class path?

I am wondering why you are not using beeline to run the query, but rather use webhcat?
New Contributor
Posts: 3
Registered: ‎03-27-2018

Re: Mapreduce error by a Hive - Webhcat job

Thanks for responding, I use the webhcat because I need the result of the query to be a json or xml file for a REST service. without using jdbc.

 

Webhcat was the first alternative I found.

 

I already solved the problem of the jar, now i have another problem, when executing the command curl the MapReduce does not find the file "hive-0.11.0.targ.gz"

 

05-04-2018 02-11-10 p-m-.png

 

Change the path in the configuration file "webhcat-default.xml", but only the node where I execute the command grabs the configuration change, the other nodes even if I change their local file "webhcat-default.xml" they remain with the old configuration.

New Contributor
Posts: 2
Registered: ‎07-11-2018

Re: Mapreduce error by a Hive - Webhcat job

Hi Rakios, How did you solve the java.lang.NoClassDefFoundError: org/apache/hadoop/hive/common/LogUtils error ?

I have created the hive.tar.gz and have made the below changes to webhcat-site.xml but i still get the above error which is  java.lang.NoClassDefFoundError: org/apache/hadoop/hive/common/LogUtils. Also, the hive.tar.gz contains the hive-common jar. 

 

<property><name>webhcat.proxyuser.webhcat.hosts</name><value>*</value><final>true</final></property><property><name>webhcat.proxyuser.webhcat.groups</name><value>*</value><final>true</final></property><property><name>templeton.libjars</name><value>/opt/cloudera/parcels/CDH-5.12.2-1.cdh5.12.2.p0.4/lib/hive-hcatalog/share/webhcat/svr/lib/zookeeper-3.4.5-cdh5.12.2.jar</value></property><property><name>templeton.hive.archive</name><value>hdfs:///apps/templeton/hive.tar.gz</value></property><property><name>templeton.hive.path</name><value>/opt/cloudera/parcels/CDH/lib/hive/hive.tar.gz/bin/hive</value></property>

 

Any help from Cloudera would also be appreciated. 

New Contributor
Posts: 2
Registered: ‎07-11-2018

Re: Mapreduce error by a Hive - Webhcat job

 I was able to solve this problem. Anybody looking for help can get in touch with me. Too bad, nobody from Cloudera responded to this in more than 2 weeks.

Posts: 869
Kudos: 100
Solutions: 53
Registered: ‎04-06-2015

Re: Mapreduce error by a Hive - Webhcat job

I am happy to see you resolved your issue @ShashankSharma. I can understand your feelings on Cloudera not responding to your post but keep in mind that this is a peer to peer forum as outlined in the community guidelines. Clouderans do reply to the community but it is not their primary work function. 



Cy Jervis, Community Manager


Was your question answered? Make sure to mark it as an accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Terms of Service

Community Guidelines

How to use the forum

Announcements