Windows 上的 Apache pig 给出“hadoop-config.cmd"不被识别为内部或外部命令"运行“pig -x local"时出错 [英] Apache pig on windows gives "hadoop-config.cmd' is not recognized as an internal or external command" error when running "pig -x local"

查看:19
本文介绍了Windows 上的 Apache pig 给出“hadoop-config.cmd"不被识别为内部或外部命令"运行“pig -x local"时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您由于类似错误而无法在 Windows 上运行 Apache Pig

If you are stuck at running Apache Pig on windows due to an error like

hadoop-2.4.0\bin\hadoop-config.cmd' is not recognized as an internal or external command,

可运行的程序或批处理文件.

operable program or batch file.

虽然你让 Hadoop 在 Windows 上完美运行

though you are having Hadoop running perfectly on windows

推荐答案

答案,最初由提问者在问题中添加.

Answer, which was originally added by the asker inside the quesiton.

这些步骤可能对您有所帮助.

These steps may help you.

问题排查步骤

  • 在任何编辑器(如 notpad/notepad++)中打开文件 pig.cmd
  • 查找行 set HADOOP_BIN_PATH=%HADOOP_HOME%\bin
  • 将其替换为 set HADOOP_BIN_PATH=%HADOOP_HOME%\libexec

我们所做的是猪没有找到 hadoop-config.cmd 文件,所以我们用正确的文件指向它.您可以先找到 hadoop-config.cmd 文件的位置并将其替换为适当的路径.这就是我的 hadoop-2.4.0 所拥有的.

What we did was that hadoop-config.cmd file was not being found by pig so we pointed it with the correct one. You may first find where the hadoop-config.cmd file is and replace it with appropriate path. This was what my hadoop-2.4.0 was having.

这篇关于Windows 上的 Apache pig 给出“hadoop-config.cmd"不被识别为内部或外部命令"运行“pig -x local"时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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