hadoop jar ~/hadoop2/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.10.0.jar wordcount hdfs://10.0.2.15:9000/words.txt hdfs://10.0.2.15:9000/out JAR does not exist or is not a normal file: /home/datasci/hadoop2/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.10.0.jar
时间: 2023-06-19 21:08:57 浏览: 88
这个错误提示表明指定的 JAR 文件不存在或者不是一个普通文件。请确认 JAR 文件路径是否正确,并且确保该文件存在。你可以使用 `ls` 命令查看该文件是否存在,如下所示:
```
ls ~/hadoop2/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.10.0.jar
```
如果该文件存在,则可能是文件权限或者文件类型不正确导致的问题。你可以使用 `chmod` 命令修改文件权限,例如:
```
chmod +x ~/hadoop2/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.10.0.jar
```
或者你可以尝试重新下载该 JAR 文件,并确保文件类型正确。如果问题仍然存在,请提供更多详细信息以便我能够更好地帮助你。
相关问题
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount input output
这是一个使用Hadoop MapReduce框架运行wordcount程序的命令。其中,hadoop是启动Hadoop的命令,jar指定要运行的jar包是hadoop-mapreduce-examples-3.1.3.jar,wordcount是要运行的程序名,input是输入文件路径,output是输出文件路径。这个命令的作用是将输入文件中单词出现的次数统计并输出到输出文件中。
如何在hadoop创建文件hdfs://10.0.2.15:9000/words.txt
你可以通过以下命令在Hadoop上创建一个名为words.txt的文件:
```
hdfs dfs -touchz hdfs://10.0.2.15:9000/words.txt
```
这个命令会在HDFS的根目录下创建一个空的words.txt文件。如果你想向文件中写入内容,你可以使用以下命令:
```
echo "你想写入的内容" | hdfs dfs -appendToFile - hdfs://10.0.2.15:9000/words.txt
```
这个命令会将"你想写入的内容"写入words.txt文件中。注意,这个命令使用了管道来将文本内容传输给hdfs dfs -appendToFile命令。