linux上安裝eclipse並配置mapreduce程式開發環境

來源:互聯網
上載者:User

標籤:linux 安裝eclipse 配置mapreduce

我們打算在linux(centos)上安裝eclipse,並配置好mapreduce程式開發環境。

第一步:下載並安裝eclipse(前提是已經安裝好JDK)

在linux系統中開啟瀏覽器,輸入網址:http://archive.eclipse.org/eclipse/downloads/我們選擇3.7.2版本。

650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/6C/D2/wKioL1VTTarACx35AAJa_lo9fgQ798.jpg" title="1.png" width="500" height="294" border="0" hspace="0" vspace="0" style="width:500px;height:294px;" alt="wKioL1VTTarACx35AAJa_lo9fgQ798.jpg" />

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/6C/D7/wKiom1VTTGjBycUXAAJYdJMX7XA557.jpg" title="2.png" alt="wKiom1VTTGjBycUXAAJYdJMX7XA557.jpg" />下載下來後,檔案存在於:

[[email protected] Downloads]$ ll

total 178052

-rw-rw-r--. 1 liuqingjie liuqingjie 182321299 May 13 05:16 eclipse-SDK-3.7.2-linux-gtk.tar.gz

複製到主目錄並解壓

[[email protected] Downloads]$ cp eclipse-SDK-3.7.2-linux-gtk.tar.gz /home/liuqingjie/

[[email protected] ~]$ tar -zxvf eclipse-SDK-3.7.2-linux-gtk.tar.gz

啟動eclipse (前提是進入圖形介面 ):

[[email protected] ~]$ cd eclipse

[[email protected] eclipse]$ ./eclipse 


第二步:配置mapreduce程式開發環境

 1.將hadoop-0.20.2-eclipse-plugin.jar (在hadoop-0.20.2/contrib/eclipse-plugin目錄下)複製到eclipse/plugins目錄下,並重啟eclipse。

2.配置Hadoop安裝目錄(目的:在建立工程的時候能將hadoop根目錄和lib目錄下的所有jar包自動匯入)

window->preference

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/6C/D8/wKiom1VTVJrB4L_wAAEjqXSyhzk553.jpg" title="3.png" width="500" height="224" border="0" hspace="0" vspace="0" style="width:500px;height:224px;" alt="wKiom1VTVJrB4L_wAAEjqXSyhzk553.jpg" />

2.開啟mapreduce視圖

window->open perspective->other,選擇Map/Reduce,表徵圖是藍色的大象:650) this.width=650;" src="http://pic002.cnblogs.com/images/2011/354747/2011112617253029.jpg" style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:14px;line-height:25.2000007629395px;text-indent:2em;border:0px;" />

3.添加一個mapreduce環境

在eclipse下端,控制台旁邊會多一個Tab,叫“Map/Reduce Locations”,在下面空白的地方點右鍵,選擇“New Hadoop location...”,:

650) this.width=650;" src="http://pic002.cnblogs.com/images/2011/354747/2011112617293785.jpg" height="120" style="border:0px;" />

在彈出的對話方塊中填寫如下內容:

Location name(隨便取個名字)
Map/Reduce Master(Job Tracker的IP和連接埠,根據mapred-site.xml中配置的mapred.job.tracker來填寫)
DFS Master(Name Node的IP和連接埠,根據core-site.xml中配置的fs.default.name來填寫)

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/6C/D8/wKiom1VTVSnQIpH3AAD_lyJPDL4651.jpg" title="4.png" width="500" height="224" border="0" hspace="0" vspace="0" style="width:500px;height:224px;" alt="wKiom1VTVSnQIpH3AAD_lyJPDL4651.jpg" />

4.使用eclipse對HDFS內容進行修改

經過上一步驟,左側“Project Explorer”中應該會出現配置好的HDFS,點擊右鍵,可以進行建立檔案夾、刪除檔案夾、上傳檔案、下載檔案、刪除檔案等操作。

注意:每一次操作完在eclipse中不能馬上顯示變化,必須得重新整理一下。

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/6C/D3/wKioL1VTV6miygsGAAGQPeLqUJM999.jpg" title="5.png" width="600" height="364" border="0" hspace="0" vspace="0" style="width:600px;height:364px;" alt="wKioL1VTV6miygsGAAGQPeLqUJM999.jpg" /> 

linux上安裝eclipse並配置mapreduce程式開發環境

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.