1.復(fù)制hadoop-eclipse-plugin-2.6.0.jar插件到eclipse的plugins目錄下(hadoop2.6的插件,在hadoop自帶上沒(méi)有,要上網(wǎng)下載,多試幾個(gè)
如果是從ubuntu自帶的軟件中心安裝elcipse的話(huà),則安裝目錄為:/usr/share/eclipse/dropins/sdk/plugins/
不是在/usr/share/eclipse/plugins
sudo cp hadoop-eclipse-plugin-2.6.0.jar /usr/share/eclipse/dropins/sdk/plugins/
?
2.重啟eclipse,配置Hadoop installation directory?? ?
???? 如果插件安裝成功,打開(kāi)Windows—Preferences后,在窗口左側(cè)會(huì)有Hadoop Map/Reduce選項(xiàng),點(diǎn)擊此選項(xiàng),在窗口右側(cè)設(shè)置Hadoop安裝路徑。
????
3.配置Map/Reduce Locations
???? 打開(kāi)Windows—Open Perspective—Other 選擇Map/Reduce,點(diǎn)擊OK
4.在右下方看到Map/Reduce Locations,點(diǎn)擊Map/Reduce Location選項(xiàng)卡,點(diǎn)擊右邊小象圖標(biāo),打開(kāi)Hadoop Location配置窗口:
注意:MR Master和DFS Master配置必須和mapred-site.xml和core-site.xml等配置文件一致
5.測(cè)試
用wordcount例子來(lái)測(cè)試
本文摘自 :https://blog.51cto.com/u