Using the libjars option with Hadoop

本文介绍了在Hadoop集群中集成HBase时遇到的问题及解决方案。作者尝试使用-libjars选项提供所需的JAR文件但未成功。最终通过修改HADOOP_CLASSPATH并设置HADOOP_USER_CLASSPATH_FIRST为true解决了找不到HBaseConfiguration类的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

As I have said in my last post, I was developing a hbase based mapreduce application. But one damn thing is the hadoop cluster managed by our system admin has no hbase jars in its classpath...

So I have to figure out how to provide jars needed by hbase to hadoop. I know "hadoop jar" command has an option "-libjars" which allow you to provide third party jars needed by your mapper or reducer. I did tried it. But it still says class HBaseConfiguration cannot be found. I tried many times without a success.

I got stuck at this...

Then a long weekend.

Today is monday. I continue work on this. I should mention that I have read the articles like these:

[url]http://blog.cloudera.com/blog/2011/01/how-to-include-third-party-libraries-in-your-map-reduce-job/[/url]

[url]http://grepalex.com/2013/02/25/hadoop-libjars/[/url]

But still failed. Finally I add the jars to HADOOP_CLASSPATH and set HADOOP_USER_CLASSPATH_FIRST true, then rerun the job, no errors any more!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值