gpt4 book ai didi

command-line - Pig 安装后 Cmd 找不到 Hadoop

转载 作者:可可西里 更新时间:2023-11-01 16:33:41 27 4
gpt4 key购买 nike

安装pig后,我不能再从命令行调用hadoop了。

例如:

C:\Users\Andrew\Documents\Hadoop\Karung>hadoop version
'hadoop' is not recognized as an internal or external command,
operable program or batch file.

下面是我的路径:

c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Python27;C:\Python27\Scripts;C:\Python27\Lib\site-packages;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin\;C:\Users\Andrew\Documents\bat_files;C:\Users\Andrew\Documents\Hadoop\hadoop-0.23.8\bin;C:\Users\Andrew\Documents\Pig\pig-0.11.1\bin

我还有像这样的 Hadoop、Pig 和 Java 安装变量:

HADOOP_INSTALL C:\Users\Andrew\Documents\Hadoop\hadoop-0.23.8

PIG_INSTALL C:\Users\Andrew\Documents\Pig\pig-0.11.1

JAVA_HOME C:\Program Files\Java\jdk1.7.0_21

一切似乎都已正确设置。当我从它们的目录运行命令时,它们都会执行。为什么命令行无法识别hadoop?谢谢!

最佳答案

简答

hadoop 是一个 bash 脚本。 Windows 命令行不知道如何运行它。

长答案

如果您想在 Windows 上运行 Hadoop,则需要进行更多设置。那里有很多教程,但老实说,最好的办法是在 unix 机器或 VM 上运行它。

Installing Hadoop on Windows

Cloudera QuickStart VM

关于command-line - Pig 安装后 Cmd 找不到 Hadoop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17219321/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com