Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

and

...

Eclipse

...

IDE

...

for

...

Java

...

Developers

...

.

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

...

Image Added

Generate eclipse files:

...

ant

...

clean

...

eclipse-files

...

Import

...

Pig

...

project

...

into

...

Eclipse

...

  1. Open

...

  1. Eclipse

...

  1. Select

...

  1. File->Import

...

  1. Select

...

  1. General->Existing

...

  1. Projects

...

  1. Into

...

  1. Workspace

...

  1. Select

...

  1. root

...

  1. directory

...

  1. (point

...

  1. to

...

  1. <top-level-directory>)

...

  1. Click

...

  1. Finish

...

Run

...

Pig

...

Main

...

  1. Create

...

  1. a

...

  1. new

...

  1. Run

...

  1. Configurations

...

  1. Pick

...

  1. "org.apache.pig.Main"

...

  1. as

...

  1. the

...

  1. Main

...

  1. class

...

Run

...

Pig

...

Unit

...

test

...

  1. Create

...

  1. a

...

  1. new

...

  1. Junit

...

  1. Run

...

  1. Configurations,

...

  1. pick

...

  1. any

...

  1. Pig

...

  1. test

...

  1. suite

...

  1. as

...

  1. "Test

...

  1. class"

...

  1. In

...

  1. "VM

...

  1. arguments",

...

  1. put

...

  1. "-Xmx1024m

...

  1. -Dhadoop.log.dir=build/test/logs"

...

  1. Change

...

  1. "Working

...

  1. directory"

...

  1. into

...

  1. your

...

  1. PIG_HOME

...

  1. In

...

  1. Classpath,

...

  1. add

...

  1. one

...

  1. user

...

  1. entries

...

  1. "${USER}/pigtest/conf"

...

Troubleshooting

  • Build problems:

...

  • Check

...

  • if

...

  • eclipse

...

  • is

...

  • using

...

  • JDK

...

  • version

...

  • 1.6,

...

  • pig

...

  • needs

...

  • it

...

  • (Under

...

  • Preferences/Java/Compiler).