You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by Apache Wiki <wi...@apache.org> on 2010/04/09 22:34:15 UTC
[Pig Wiki] Update of "Eclipse_Environment" by AshutoshChauhan
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The "Eclipse_Environment" page has been changed by AshutoshChauhan.
http://wiki.apache.org/pig/Eclipse_Environment?action=diff&rev1=12&rev2=13
--------------------------------------------------
For Pig, you need the [[http://www.easyeclipse.org/site/plugins/javacc.html|JavaCC plugin]] and the[[http://subclipse.tigris.org/|Subclipse Subversion plugin]].
To download and install the plugins:
+
- 1. Open Eclipse
+ 1. Open Eclipse
1. Select Help > Software Updates... > Available Software
1. Add the two plugin sites by pressing Add Site... Button
- * http://eclipse-javacc.sourceforge.net
+ 1. http://eclipse-javacc.sourceforge.net
- * http://subclipse.tigris.org/update_1.4.x
+ 1. http://subclipse.tigris.org/update_1.4.x
- 1.#4 Select the plugins that appear under these sites
+ 1. Select the plugins that appear under these sites
1. Press Install - and follow the prompts to download and install the plugins
==== Add the Pig Trunk Repository ====
To add the Pig trunk repository:
+
1. Open Eclipse
1. Select file > New > Other...
1. Choose SVN, Repository Location > Next
1. Under the General tab:
- * URL: http://svn.apache.org/repos/asf/hadoop/pig/trunk
+ 1. URL: http://svn.apache.org/repos/asf/hadoop/pig/trunk
- * Use a custom label: Pig
+ 1. Use a custom label: Pig
- 1.#5 Click Finish
+ 1. Click Finish
To view the results:
+
* Window > Open Perspective > Other... > SVN Repository Exploring
* Window > Show View > SVN Repositories
==== Create a Java Project ====
-
First, create a directory on your development machine (for example "mypig") and checkout the Pig source from SVN: http://svn.apache.org/repos/asf/hadoop/pig/trunk
Note: Windows users need to download and install TortoiseSVN (http://tortoiseSVN.tigris.org/)
To create a Java project:
+
1. Open Eclipse
1. Select file > New > Other ...
1. Select Java Project
1. On the New Java Project dialog:
- * Project name: !PigProject
+ 1. Project name: !PigProject
- * Select: Create project from existing source
+ 1. Select: Create project from existing source
- * Directory: browse to the "mypig" directory on your development machine and select the Trunk directory
+ 1. Directory: browse to the "mypig" directory on your development machine and select the Trunk directory
- 1.#5 Click Next
+ 1. Click Next
1. Click Finish
To view the results:
+
* Window > Open Perspective > Java
* Window > Show View > ''see the various options ...''
@@ -54, +58 @@
After the Java project is created, update the build configuration.
To update the build configuration:
+
1. Open Eclipse
1. Select Window > Open Perspective > Java (to open the !MyPig project)
1. Select Project > Properties
1. For the Java Build Path, check the settings as shown below.
Source
+
{{{
lib-src/bzip2
lib-src/shock
@@ -68, +74 @@
test -> Make sure nothing is excluded
The default output folder should be bin.
+ }}}
+ Libraries
- }}}
-
-
- Libraries
{{{
lib/hadoopXXX.jar
lib/hbaseXXX-test.jar
lib/hbaseXXX.jar
+ lib/Pig/zookeeper-hbase-xxx.jar
build/ivy/lib/Pig/javacc.jar
- build/ivy/lib/Pig/jline-XXX.jar
+ build/ivy/lib/Pig/jline-XXX.jar
build/ivy/lib/Pig/jsch-xxx.jar
build/ivy/lib/Pig/junit-xxx.jar
+ }}}
+ NOTE:
- }}}
- NOTE: For pig sources checked out from Apache before revision r771273, replace "build/ivy/lib/Pig" with "lib". Revision r771273 and above in apache svn use ivy to resolve dependencies need to build pig.
+ 1. For pig sources checked out from Apache before revision r771273, replace "build/ivy/lib/Pig" with "lib". Revision r771273 and above in apache svn use ivy to resolve dependencies need to build pig.
+ 1. If you are building piggybank you will need few extra jars. You can find all of those in build/ivy/lib/Pig/ once you run jar target of ant successfully.
Order and Export
+
{{{
Should have be the following order:
@@ -96, +104 @@
src
JRE System Library
all the jars from the "Libraries" tab
-
}}}
-
-
==== Troubleshooting ====
- * Build problems: Check if eclipse is using JDK version 1.6, pig needs it (Under Preferences/Java/Compiler).
+ * Build problems: Check if eclipse is using JDK version 1.6, pig needs it (Under Preferences/Java/Compiler).
==== Tips ====
- * To build using eclipse , open the ant window (Windows/Show View/Ant) , then drag and drop build.xml under your project to this window. Double click on jar in that will build pig.jar, on test will run unit tests.
+ * To build using eclipse , open the ant window (Windows/Show View/Ant) , then drag and drop build.xml under your project to this window. Double click on jar in that will build pig.jar, on test will run unit tests.