转自:http://www.blogjava.net/paulwong/archive/2012/10/03/388977.html
如果是在WINDOWS的ECLIPSE中,运行HBASE的MAPREDUCE,会出现异常,这是由于默认运行MAPREDUCE任务是在本地运行,而由于会建立文件赋权限是按照UNIX的方式进行,因此会报错:

解决办法是将任务发到运程主机,通常是LINUX上运行,在hbase-site.xml中加入:




同时需把HDFS的权限机制关掉:




另外由于是在远程上执行任务,自定义的类文件,如Maper/Reducer等需打包成jar文件上传,具体见方案:
Hadoop作业提交分析(五)http://www.cnblogs.com/spork/archive/2010/04/21/1717592.html
研究了好几天,终于搞清楚,CONFIGUARATION就是JOB的配置信息,远程JOBTRACKER就是以此为参数构建JOB去执行,由于远程主机并没有自定义的MAPREDUCE类,需打成JAR包后,上传到主机处,但无需每次都手动传,可以代码设置:

另注意,如果在WINDOWS系统中,文件分隔号是“;”,生成的JAR包信息是以“;”间隔的,在远程主机的LINUX上是无法辨别,需改为:

参考文章:
http://www.cnblogs.com/xia520pi/archive/2012/05/20/2510723.html
使用hadoop eclipse plugin提交Job并添加多个第三方jar(完美版)
http://heipark.iteye.com/blog/1171923