hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "EclipseEnvironment" by JimPlush
Date Sat, 25 Jun 2011 04:35:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "EclipseEnvironment" page has been changed by JimPlush:
http://wiki.apache.org/hadoop/EclipseEnvironment?action=diff&rev1=38&rev2=39

Comment:
Added up to date Eclipse instructions that I've tested several times for accuracy.

  = Working with Hadoop under Eclipse =
- 
  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, installed, and configured
to your liking.
  
  == Quick Start ==
+ We will begin by downloading the Hadoop source. The hadoop-common source tree has three
subfolders(subprojects) underneath it that you will see after you pull down the source code.
hdfs, common, and mapreduce.
  
- From a Hadoop checkout (see HowToContribute) in your Eclipse base directory type
+ Let's begin by getting the latest source from GitHub (please note there is a time delay
between the Apache svn repository and replicating over changes 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 the code to get it ready for importing
into Eclipse.
+ 
+ From a Hadoop checkout (see HowToContribute) in your Eclipse base directory 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 compile-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 "hadoop-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 expected since it
is a part of a testcase that checks for incorrect packaging.
  
  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 complain)
  
  == Longer instructions ==
- 
  === Download and install the Subversive plug-in ===
- 
  Subversive helps you manage an SVN checkout in Eclipse.  It's not strictly necessary, but
the integration is handy.
  
   * [[http://www.polarion.org/index.php?page=overview&project=subversive|Subversive web
site]]
  
- The easiest way to download and install is to use Eclipse's Update Manager. 
- That process is well described one [[http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php|the
Subversive's site]]. Think to add both two update sites: "Subversive plug-in" and "Subversive
SVN Connectors plug-in".
+ The easiest way to download and install is to use Eclipse's Update Manager.  That process
is well described one [[http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php|the
Subversive's site]]. Think to add both two update sites: "Subversive plug-in" and "Subversive
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/update-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 versions 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 svn library
is a subclipse
  
  === Associate the Hadoop Trunk Repository ===
- 
-  * 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 (select "Open Perspective.")
  
  === Create a Project ===
+ From the SVN Repositories perspective:
  
- From the SVN Repositories perspective:
   * Turn off "Project...Build Automatically"; it slows things down for this 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 | Build Automatically)
to avoid building before the project is completely setup by running the Ant scripts (below)
  
  === Using Subversive with already `checkout`ed projects ===
- 
  Refer to the [[http://www.polarion.org/index.php?page=faq&project=subversive|Subversive
FAQ]].
  
  '''Note''': Using Subversive is optional.  You can point Eclipse to an existing source checkout
by selecting "Create project from existing source" in the "New Java Project" wizard.  Setup
the project the same way you would if you were doing a fresh checkout (see above).

Mime
View raw message