Community Articles
Find and share helpful community-sourced technical articles.
Labels (1)

As I was reading over Pig mailing lists, I found a plugin that allows one to turn Eclipse IDE into a Pig editor. There are alternatives like Ambari Pig view and Hue but if you're comfortable using an IDE, then you will feel right at home with this plugin. Setup is fairly straightforward and surprisingly supports Pig from 0.11 to 0.16, which means you can even use it with the latest HDP 2.5 release! The best part, I didn't need to start a Sandbox, download a binary distribution of Pig or mess with any config files, once plugin is installed you can start scripting as if you were working on a cluster. It is still work in progress but feature list is impressive nonetheless. It supports the following features as of 9/13/16:

  • supports Apache Pig Latin 0.11 - 0.16
  • syntax highlighting
  • open declaration (F3) - for macros, defines, and UDF's
  • auto complete (ctrl+space) - defines, relations, reserved words, built in functions
  • toggle comment (ctrl+shift+c) - to comment/uncomment a block using --
  • find references (ctrl+shift+g) - preliminary implementation, to find usages of macros
  • hover information (tooltips) for macro definitions, UDF's and built in functions (javadocs) and some keywords
  • preferences page for colors, Pig version, auto complete behavior and more

I will explore some of the features in this article.

I guess the one limitation I've found is that it's tested with older versions of Eclipse with latest being Luna. I am running this demo with Luna to avoid any unforeseen issues.

First thing we need to do is go to Help > Install New Software, give the plugin a name and enter URL


Select the Pig-Eclipse plugin and hit Next


Eclipse will fetch the bits


Accept the EULA and hit Finish


At this point we can create a new project in a typical Eclipse fashion and start writing Pig scripts


Saving Pig scripts with .pig extension identifies them automatically, you can change the behavior in preferences section


Let's see code completion, you invoke it with ctrl+space



You can toggle comment with ctrl+shft+c


and you can change preferences for theme and colors as well as behavior based on Pig version


This of course is not meant to be an exhaustive deep-dive into Pig-Eclipse but something to get you started. Overall, it's an interesting project that I'll be spending more time with, the convenience, ease-of-use and independence from Sandbox are all of the benefits of using this plugin over other alternatives. I thank the author for his contribution. Here's the project GitHub page.

Not applicable

Hi currently I am using eclipse jee neon IDE and i have configured apache Pig with it. Based upon the instructions i have created hadoop file system and uploaded some data files into it. I have also written a Pig script to run some codes. But i am unable to run the script as its showing an exception 'unable to launch'. Please suggest any workaround to fix this issue. Below is the snapshot of the same.pig-eclipse.png

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎08-17-2019 10:04 AM
Updated by:
Top Kudoed Authors
; ;