找不到Hadoop命令 [英] Hadoop command not found

查看:314
本文介绍了找不到Hadoop命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在linux机器上安装并配置了hadoop。现在我正在尝试运行一个示例MR作业。我已经通过命令/usr/local/hadoop/bin/start-all.sh和输出启动了hadoop是

I have installed and configured hadoop in a linux machine .Now i am trying to run a sample MR job.I have started the hadoop via the command /usr/local/hadoop/bin/start-all.sh and the output is

namenode running as process 7876. Stop it first.
localhost: datanode running as process 8083. Stop it first.
localhost: secondarynamenode running as process 8304. Stop it first.
jobtracker running as process 8398. Stop it first.
localhost: tasktracker running as process 8612. Stop it first.

所以我认为我的hadoop配置成功。但是当我试着在命令下运行它是给予

so i think that my hadoop is configured successfully.But when i am tryinh to run below command it is giving

jeet@jeet-Vostro-2520:~$ hadoop fs -put gettysburg.txt /user/jeet/getty/gettysburg.txt
hadoop: command not found

我是hadoop.somebody的新用户请帮忙。我还发布了我正在尝试的截图

i am new in hadoop.somebody please help .I am also posting the screenshot of what i am trying

推荐答案

从您的命令历史中可以看出,您可以通过 / usr替换 hadoop / local / hadoop / bin / hadoop 它应该有帮助。

As it seems from your commands history, you can replace hadoop by /usr/local/hadoop/bin/hadoop and it should help.

如果你想要使用 hadoop 命令而不指定它的完整路径,你可以编辑〜/ .bashrc 文件并添加以下行:

If you want to use hadoop command without specifying the full path to it, you can edit ~/.bashrc file and add the following line:

export PATH=$PATH:/usr/local/hadoop/bin/

然后你需要重新打开你的终端。

Then you need to reopen your terminal.

这篇关于找不到Hadoop命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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