Set the environment variable PIG_CLASSPATH=/opt/hadoop/conf.

Alan.

On Apr 12, 2011, at 1:39 PM, W.P. McNeill wrote:

I am having trouble getting Pig to see my Hadoop configuration files despite
following the "Classpath in MapReduce Mode" instructions in the
Troubleshooting<http://pig.apache.org/docs/r0.8.0/pigunit.html#Troubleshooting+Tips >tips.

I am running Mac OSX 10.6.7, Hadoop Core 0.20.2, and Pig 0.8.0. Hadoop and Pig are installed under /opt/hadoop and /opt/pig, respectively. Hadoop is
set up to run in single-node pseudo-distributed mode.  The
/opt/hadoop/conf/core-site.xml file looks like this:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
 <property>
   <name>fs.default.name</name>
   <value>hdfs://localhost:9000</value>
 </property>
</configuration>

I am able to run Hadoop jobs in this mode.

I am able to run pig in local mode with "pig -x local", but when I try to
run just "pig" at the command line I get the following error.

pig
2011-04-12 13:35:20,113 [main] INFO org.apache.pig.Main - Logging error
messages to: /Users/williammcneill/pig_1302640520111.log
2011-04-12 13:35:20,262 [main] ERROR org.apache.pig.Main - ERROR 4010:
Cannot find hadoop configurations in classpath (neither hadoop- site.xml nor core-site.xml was found in the classpath).If you plan to use local mode,
please put -x local option in command line
Details at logfile: /Users/williammcneill/pig_1302640520111.log

The log file contains the same error message along with a trace stack that
ends in HExecutionEngine.init(HExecutionEngine.java:168).

My classpath is set like so:

CLASSPATH=:/opt/hadoop/conf

What am I doing wrong?

Thanks.

Reply via email to