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 85CD24214 for ; Sat, 25 Jun 2011 04:36:21 +0000 (UTC) Received: (qmail 25931 invoked by uid 500); 25 Jun 2011 04:36:18 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 25830 invoked by uid 500); 25 Jun 2011 04:35:41 -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 25811 invoked by uid 500); 25 Jun 2011 04:35:36 -0000 Delivered-To: apmail-hadoop-core-commits@hadoop.apache.org Received: (qmail 25808 invoked by uid 99); 25 Jun 2011 04:35:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 04:35:35 +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, 25 Jun 2011 04:35:32 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 700F7D75; Sat, 25 Jun 2011 04:35:12 +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, 25 Jun 2011 04:35:12 -0000 Message-ID: <20110625043512.96411.36978@eos.apache.org> Subject: =?utf-8?q?=5BHadoop_Wiki=5D_Update_of_=22EclipseEnvironment=22_by_JimPlus?= =?utf-8?q?h?= 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 JimPlush: http://wiki.apache.org/hadoop/EclipseEnvironment?action=3Ddiff&rev1=3D38&re= v2=3D39 Comment: Added up to date Eclipse instructions that I've tested several times for ac= curacy. =3D Working with Hadoop under Eclipse =3D - = Here are instructions for setting up a development environment for Hadoop= under the Eclipse IDE. Please feel free to make additions or modifications= to this page. = This document (currently) assumes you already have Eclipse downloaded, in= stalled, and configured to your liking. = =3D=3D Quick Start =3D=3D + We will begin by downloading the Hadoop source. The hadoop-common source = tree has three subfolders(subprojects) underneath it that you will see afte= r you pull down the source code. hdfs, common, and mapreduce. = - From a Hadoop checkout (see HowToContribute) in your Eclipse base directo= ry type + 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). = {{{ - ant compile eclipse + git clone https://github.com/apache/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. + = + From a Hadoop checkout (see HowToContribute) in your Eclipse base directo= ry type (assuming you're in the hadoop-common top level directory) + = + {{{ + cd common; ant compile eclipse + cd ../; cd hdfs; ant compile eclipse + cd ../; cd mapreduce; ant compile eclipse + }}} + *Note: If the mapreduce compile fails try to compile just the core "ant c= ompile-core eclipse" = Then in Eclipse: = * File -> New Project... - * Choose the General / Project wizard + * Choose the "Java Project" from the wizard - * Enter the project name corresponding to the checkout directory, e.g. `= hadoop-common-trunk` and hit "Finish". + * Enter the project name corresponding to the checkout directory, e.g. `= hadoop-common-trunk` + * Uncheck the "Use default location" checkbox, browse to the location of= your top level source code (in this case the hadoop-common directory) + * Click "Next" + * Change your default output folder from "hadoop-common-trunk/bin" to "h= adoop-common-trunk/build/eclipse-classes" + * and hit "Finish". = Eclipse will then create the project and build it. = Note: in the case of MapReduce the `testjar` package is broken. This is e= xpected since it is a part of a testcase that checks for incorrect packagin= g. = 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) = =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/do= cumentation/gettingStarted/aboutSubversive/install.php|the Subversive's sit= e]]. Think to add both two update sites: "Subversive plug-in" and "Subversi= ve SVN Connectors plug-in". + 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://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... = + * Select File > New > Other... * Then SVN > Repository Location wizard * Based on needs, use one of the following as the Root URL. - * http://svn.apache.org/repos/asf/hadoop/common/trunk = + * http://svn.apache.org/repos/asf/hadoop/common/trunk - * http://svn.apache.org/repos/asf/hadoop/hdfs/trunk = + * http://svn.apache.org/repos/asf/hadoop/hdfs/trunk - * http://svn.apache.org/repos/asf/hadoop/mapreduce/trunk = + * http://svn.apache.org/repos/asf/hadoop/mapreduce/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: = - 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 @@ -72, +86 @@ * 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).