本人学习hadoop中接触到pig,安装完毕,local模式启动正常,
yangchao@yangchao-VirtualBox:~/Downloads/hadoop-0.20.2$ pig -x local
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
2012-04-14 18:51:40,625 [main] INFO  org.apache.pig.Main - Logging error messages to: /home/yangchao/Downloads/hadoop-0.20.2/pig_1334400700623.log
2012-04-14 18:51:40,769 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
grunt> 但是用如下命令启动就是报错:
yangchao@yangchao-VirtualBox:~/Downloads/hadoop-0.20.2$ pig -x mapreduce
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
2012-04-14 18:52:28,567 [main] INFO  org.apache.pig.Main - Logging error messages to: /home/yangchao/Downloads/hadoop-0.20.2/pig_1334400748565.log
2012-04-14 18:52:28,776 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://localhost:9000/
2012-04-14 18:52:29,966 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 0 time(s).
2012-04-14 18:52:30,969 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 1 time(s).
2012-04-14 18:52:31,971 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 2 time(s).
2012-04-14 18:52:32,973 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 3 time(s).
2012-04-14 18:52:33,974 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 4 time(s).

2012-04-14 18:53:19,538 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: localhost/127.0.0.1:9000. Already tried 9 time(s).
2012-04-14 18:53:19,569 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Failed to create DataStorage
Details at logfile: /home/yangchao/Downloads/hadoop-0.20.2/pig_1334400789127.log
我的pig目录下的conf中的pig.properties中已经配置了:
fs.default.name=hdfs://localhost:9000/
mapred.job.tracker=localhost:9001hadoop目录中core-site.xml:
<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000/</value>
     </property>
</configuration>mapred-site.xml中:
<configuration>
    <property>
       <name>mapred.job.tracker</name>
       <value>localhost:9001</value>
    </property>
</configuration>为什么用pig mapreduce模式就是连不上呢?