You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Alberto Luengo Cabanillas <ca...@gmail.com> on 2009/09/15 18:17:36 UTC

Error using example generator

Hi all.
I´ve integrated the PigPen plugin in Eclipse 3.5 (Galileo) succesfully so as
the Hadoop plugin (0.18.1). Also I did execute the example script 'id.pig'
(the one who splits the contents from /etc/passwd file) in my remote HDFS
with correct results. But when I try to execute the "example generator", the
Eclipse console prompts the following error:

*Ready to run the example generator
org.apache.hadoop.dfs.DistributedFileSystem cannot be cast to
org.apache.hadoop.fs.FileSystem
Please set the ConfigurationPath variable in Pig Preferences (Window ->
Preferences -> Pig) to point to the directory containing hadoop-site.xml and
pig.properties*

Of course, I´ve set this variable, and I think I made it properly
(otherwise, the hadoop execution wouldn´t work, am I wrong?). Also the
Eclipse "error log" throws the following exception:

*!ENTRY org.eclipse.ui 4 0 2009-09-15 17:16:56.609
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
    at
org.apache.pig.pigpen.util.ExampleGeneratorLauncher.kill(ExampleGeneratorLauncher.java:252)
    at
org.apache.pig.pigpen.view.ExampleTreeViewer.kill(ExampleTreeViewer.java:162)
    at
org.apache.pig.pigpen.actions.KillExampleGeneratorDelegate.run(KillExampleGeneratorDelegate.java:50)
    at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)*

All this make me think that probably my "pig.properties" isn´t set in the
right way...This is what I have:
*
# Pig configuration file. All values can be overwritten by command line
arguments.
# see bin/pig -help

# log4jconf log4j configuration file
log4jconf=C:/PigPen/log4j.properties

# brief logging (no timestamps)
brief=false

# clustername, name of the hadoop jobtracker. If no port is defined port
50020 will be used.
cluster=hdfs://192.168.113.130:50030

#debug level, INFO is default
debug=INFO

# a file that contains pig script
#file=

# load jarfile, colon separated
jar=/home/hadoop-user/pig/pig.jar

#verbose print all log messages to screen (default to print only INFO and
above to screen)
verbose=TRUE

#exectype local|mapreduce, mapreduce is default
exectype=mapreduce
#hod realted properties
#ssh.gateway
#hod.expect.root
#hod.expect.uselatest
#hod.command
#hod.config.dir
#hod.param

#Do not spill temp files smaller than this size (bytes)
#pig.spill.size.threshold=100000*

Finally, when I try 'run example generator locally', the console doesn´t
bring up any error but it does nothing (only shows 'Ready to run example
generator'...).
Could anyone please help me with this problem?
Thanks a lot and sorry for all the code.


-- 
Alberto