在本地或mapreduce模式下都无法运行清管器 [英] Trouble running pig in both local or mapreduce mode

查看:101
本文介绍了在本地或mapreduce模式下都无法运行清管器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows 7计算机上运行的Ubuntu VM上运行了Hadoop 1.2.我最近在同一Ubuntu VM上安装了Pig 0.12.0.我已经从apache网站下载了pig-0.12.0.tar.gz.我已经正确设置了所有变量,例如JAVA_HOME,HADOOP_HOME,PIG_HOME变量.当我尝试以本地模式启动Pig时,这是我看到的:

I already have Hadoop 1.2 running on my Ubuntu VM which is running on Windows 7 machine. I recently installed Pig 0.12.0 on my same Ubuntu VM. I have downloaded the pig-0.12.0.tar.gz from the apache website. I have all the variables such as JAVA_HOME, HADOOP_HOME, PIG_HOME variables set correctly. When I try to start pig in local mode this is what I see:

chandeln@ubuntu:~$ pig -x local
pig: invalid option -- 'x'
usage: pig

chandeln@ubuntu:~$ echo $JAVA_HOME
/usr/lib/jvm/java7  
chandeln@ubuntu:~$ echo $HADOOP_HOME
/usr/local/hadoop
chandeln@ubuntu:~$ echo $PIG_HOME
/usr/local/pig
chandeln@ubuntu:~$ which pig
/usr/games/pig

chandeln@ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java7/bin:/usr/local/hadoop/bin:/usr/local/pig/bin

由于我不是Unix专家,所以我不确定这是否是问题,但是命令which pig实际上返回/usr/games/pig而不是/usr/local/pig.这是问题的根本原因吗?

Since I am not a Unix expert I am not sure if this is the problem but the command which pig actually returns /usr/games/pig instead of /usr/local/pig. Is this the root cause of the problem?

请指导.

推荐答案

我能够通过更改.bashrc中的以下行来解决此问题.这优先于/usr/local/pig目录,而不是/usr/games/pig

I was able to fix the problem by changing the following lines in my .bashrc. This gave precedence to the /usr/local/pig directory instead of /usr/games/pig

BEFORE: export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$PIG_HOME/bin
AFTER: export PATH=$JAVA_HOME/bin:$HADOOP_HOME/bin:$PIG_HOME/bin:$PATH

这篇关于在本地或mapreduce模式下都无法运行清管器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆