簡易步驟:eclipse
1拷插件到eclipse的plugins中;2關聯安裝的hadoop;oop
3新建 hadoop location(配置hadoop的端口等相關信息;4跑程序。
spa
詳細步驟:插件
1。網上下載hadoop的eclipse插件ip
這是個人:hadoop-eclipse-plugin-1.2.1.jarhadoop
2。添加下載的插件到eclipse 的plugins中資源
3。將本地的hadoop 安裝路徑添加到eclipse中get
打開eclipse Window->Prefrences->Hadoop Map/Reduce 將你的hadoop的本地路徑添加進去input
4。 顯示大象 :Window->Show View->Other-> Map/Reduce Locationsit
5。new hadoop location
點擊4圖中的Localtion->new hadoop location
6。新建map/reduce project
7。打開資源視圖,就能看到hadoop的管理文件夾 ,能夠在此上傳文件。
Window-> Open Perspective ->Others ->Resource
8。run-> run configurations 並在arguments中輸入參數
(以hadoop自帶的wordcount 輸入文件夾input 輸出output)
hdfs://localhost:9000/user/lcj/input hdfs://localhost:9000/user/lcj/output
點擊run運行。
結果:
刷新資源視圖中的dfs以後會多出一個文件夾output