Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h2. Install Eclipse

...


Eclipse is an open source development community.  If you have not already done so, download and install Eclipse on your development machine. For more information, see [Eclipse|http://www.eclipse.org] and [Eclipse IDE for Java Developers

...

Checkout Pig

...

|http://www.eclipse.org/downloads/moreinfo/java.php].

h2. Checkout Pig
Create a directory on your development machine (for example "mypig") and checkout the Pig source from SVN: http://svn.apache.org/repos/asf/pig/trunk

...



h2. Generate eclipse files:

...


ant clean eclipse-files

...



h2. Import Pig project into Eclipse

...



 # Open Eclipse

...


 # Select File->Import

...


 # Select General->Existing Projects Into Workspace

...


 # Select root directory (point to <top-level-directory>)

...


 # Click

...

Troubleshooting

...

 Finish

h2. Run Pig Main
 # Create a new Run Configurations
 # Pick "org.apache.pig.Main" as the Main class

h2. Run Pig Unit test
 # Create a new Junit Run Configurations, pick any Pig test suite as "Test class"
 # In "VM arguments", put "-Xmx1024m -Dhadoop.log.dir=build/test/logs"
 # Change "Working directory" into your PIG_HOME
 # In Classpath, add one user entries "${USER}/pigtest/conf"

h2. Troubleshooting
 * Build problems: Check if eclipse is using JDK version 1.6, pig needs it (Under Preferences/Java/Compiler).