原创文章,转载请注明出处:http://qq85609655.iteye.com/blog/2109124
最近,hadoop升级到了最新的2.4版本
使用ambari 部署完毕后。
使用开源的ETL工具Kettle,最新的版本是5.1
下载地址:http://jaist.dl.sourceforge.net/project/pentaho/Data%20Integration/5.1/pdi-ce-5.1.0.0-752.zip
最新的版本已经包含了hadoop的版本,不过是2.2.0的版本,这里存在版本冲突。尤其是MR2的
org.apache.hadoop.mapreduce.JobCounter.MB_MILLIS_MAPS等枚举属性多了,导致兼容问题的存在。。。
这里主要将,如何解决
首先对拷贝一致的版本包
cp /usr/lib/hadoop/hadoop-*[0-9].jar ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client cp /usr/lib/hadoop-hdfs/hadoop-*[0-9].jar ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client cp /usr/lib/hadoop-mapreduce/hadoop-*[0-9].jar ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client cp /usr/lib/hadoop-yarn/hadoop-*[0-9].jar ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client
拷贝一致的版本,同时删除hadoop-*2.2.0.2.0.6.0-76.jar的包
rm -f ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client/hadoop-*2.2.0.2.0.6.0-76.jar
拷贝配置文件
cd /etc/hadoop/conf cp core-site.xml ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20 cp hdfs-site.xml ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20 cp mapred-site.xml ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20 cp yarn-site.xml ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20
到了这一步,基本上就完成了,执行Kettle的job试试。
发现报错
这个什么原因,查询是包${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/client/hadoop-yarn-common-2.4.0.2.1.2.1-471.jar这个包不存在方法,可是通过反编译,明明存在呀。
百思不得其解,原来万恶的windows补丁造成的,这个补丁被先加载。。。
rm -f ${KETTLE_HOME}/plugins/pentaho-big-data-plugin/hadoop-configurations/hdp20/lib/hadoop2-windows-patch-01092014.jar
再尝试下,OK,完美!