pig-user  

Re: connecting to cluster with bin/pig

Alan Gates
Tue, 01 Jul 2008 09:24:15 -0700

Are you setting exectype to 'mapreduce'? It looks like you have it set to 'local'. Also, make sure you include the directory that your hadoop-site.xml is in in the class path, not the file itself.

If neither of those resolve your issue, please post your whole pig.properties file.

Alan.

Gert Pfeifer wrote:
Hi,
I am trying to start pig for the first time, so here is a beginner's
question.

How do I tell the bin/pig shell script where the cluster can be found?
I used the conf/pic.properties as follows:

# clustername, name of the hadoop jobtracker. If no port is defined port
50020 will be used.
cluster=<ip address of the job tracker>

Then I get a message:
[main] INFO
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  -
Connecting to hadoop file system at: file:///

Then I get the grunt shell on the local file system, which is not quite
what I wanted.

I also tried this:
java -cp pig.jar:../../path/to/hadoop-site.xml  org.apache.pig.Main

But I saw the same result. So how do I connect to the name node and the
job tracker? I guess I need both, don't I?

Thanks for any hints,
Gert