Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DCE9995E for ; Sat, 26 Nov 2011 18:19:32 +0000 (UTC) Received: (qmail 28677 invoked by uid 500); 26 Nov 2011 18:19:32 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 28642 invoked by uid 500); 26 Nov 2011 18:19:32 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 28635 invoked by uid 500); 26 Nov 2011 18:19:32 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 28632 invoked by uid 99); 26 Nov 2011 18:19:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Nov 2011 18:19:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Nov 2011 18:19:30 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 7C172C11; Sat, 26 Nov 2011 18:19:10 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Sat, 26 Nov 2011 18:19:10 -0000 Message-ID: <20111126181910.57731.24499@eos.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22EclipseEnvironment=22_by_SteveLo?= =?utf-8?q?ughran?= Auto-Submitted: auto-generated Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for ch= ange notification. The "EclipseEnvironment" page has been changed by SteveLoughran: http://wiki.apache.org/hadoop/EclipseEnvironment?action=3Ddiff&rev1=3D47&re= v2=3D48 =3D=3D Quick Start =3D=3D We will begin by downloading the Hadoop source. The hadoop-common source = tree has three subprojects underneath it that you will see after you pull d= own the source code: hadoop-common, hdfs, and mapreduce. = - Let's begin by getting the latest source from GitHub (please note there i= s a time delay between the Apache svn repository and replicating over chang= es to GitHub). + Let's begin by getting the latest source from Git (Note there is a a copy= mirrored on github but it lags the Apache read-only git repository slightl= y). = {{{ - git clone git://github.com/apache/hadoop-common.git + git clone git://git.apache.org/hadoop-common.git }}} This will create a hadoop-common folder in your current directory, if you= "cd" into that folder you will see the 3 subprojects. Now we will build th= e code to get it ready for importing into Eclipse. = @@ -53, +53 @@ To run tests from Eclipse you need to additionally do the following: = * Under project Properties, select Java Build Path, and the Libraries tab - * Click "Add External Class Folder" and select the `build` directory of = the current project (it has to be an External folder, or Eclipse will compl= ain) + * Click "Add External Class Folder" and select the `build` directory of = the current project = - * Add tools.jar in JDK lib to Project build path to resolve to com.sun.j= avadoc packages = - =3D=3D To Create a Patch: =3D=3D - cd into your hadoop-common parent directory. Assuming you've staged your = files using "git add File1.java" you can create a patch with your files and= changes with the following command. - = - {{{ - git diff --cached --no-prefix > /tmp/HDFS-0000.txt - }}} - = - Verify the patch contains only the code you're proposing for the change/f= ix and it's ready to upload as a patch in Jira. - = - =3D=3D Longer instructions =3D=3D - =3D=3D=3D Download and install the Subversive plug-in =3D=3D=3D - Subversive helps you manage an SVN checkout in Eclipse. It's not strictl= y necessary, but the integration is handy. - = - * [[http://www.polarion.org/index.php?page=3Doverview&project=3Dsubversi= ve|Subversive web site]] - = - The easiest way to download and install is to use Eclipse's Update Manage= r. That process is well described one [[http://www.eclipse.org/subversive/= documentation/gettingStarted/aboutSubversive/install.php|the Subversive's s= ite]]. Think to add both two update sites: "Subversive plug-in" and "Subver= sive SVN Connectors plug-in". - = - Specifically, you'll want to add the following "update sites" to - = - * http://www.polarion.org/projects/subversive/download/eclipse/2.0/updat= e-site/ -- "SVN Connectors Site" - * http://download.eclipse.org/technology/subversive/0.7/update-site/ -- = "Subversive Site" - * http://subclipse.tigris.org/update_1.6.x -- "Subclipse Site" - = - You'll need to install: - = - * Subversive SVN Connectors - * Subversive SVN Team Provider (Incubation) - * SVNKit 1.1.7 Implementation (Optional) -- You have a choice of version= s here. Use 1.1.7 if your svn is 1.4; use 1.2.2 if your svn is 1.5. - * Subclipse > Subclipse, Core SVNKit Library > SVNKit Library if your sv= n library is a subclipse - = - =3D=3D=3D Associate the Hadoop Trunk Repository =3D=3D=3D - * Select File > New > Other... - * Then SVN > Repository Location wizard - * Use the following as the Root URL. - * http://svn.apache.org/repos/asf/hadoop/common/trunk - * I set a custom label of "Hadoop". - * The repository will show up under "SVN Repositories" Perspective (sele= ct "Open Perspective.") - = - =3D=3D=3D Create a Project =3D=3D=3D - From the SVN Repositories perspective: - = - * Turn off "Project...Build Automatically"; it slows things down for thi= s step. - * Right-click Hadoop > "Trunk" and select "Find/Check Out As..." - * Check out as a project configured using the New Project Wizard - * Java Project - * Project Name: "Hadoop" - * Be sure to change the "Default output folder" (on the second page of t= he "New Java Project" wizard) to `PROJECT_NAME/build/eclipse-classes`. If = you use the default (`PROJECT_NAME/bin`), Eclipse has a tendency to blow aw= ay the handy scripts in that directory. - * Note that you might want to turn off auto-builds (under Project | Buil= d Automatically) to avoid building before the project is completely setup b= y running the Ant scripts (below) - = - =3D=3D=3D Using Subversive with already `checkout`ed projects =3D=3D=3D - Refer to the [[http://www.polarion.org/index.php?page=3Dfaq&project=3Dsub= versive|Subversive FAQ]]. - = - '''Note''': Using Subversive is optional. You can point Eclipse to an ex= isting source checkout by selecting "Create project from existing source" i= n the "New Java Project" wizard. Setup the project the same way you would = if you were doing a fresh checkout (see above). -=20