hadoop - 如何解决windows 10中hadoop的这个错误?
问题描述
当我进入时,
hadoop fs -put Pras.txt
我遇到了这个错误
put: Call From LAPTOP-EOKJS2KE/192.168.56.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused: no further information
我在 hdfs-site.xml 中对此进行了编辑
hdfs-site.xml
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>C:\hadoop\data\namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>C:\hadoop\data\datanode</value>
</property>
</configuration>
并在 core-site.xml 中对此进行了编辑
核心站点.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
解决方案
推荐阅读
- javascript - 仅在第一个方法完成后如何调用另一个方法
- python - 如何模拟在构造函数中实例化的对象?
- awk - 在文件中找到一个字符串,然后用 bash 找到上面包含另一个字符串的第一行?
- python-3.x - 根据条件将数据框的一列与另一个数据框连接
- javascript - Undestanding Recursion with return values in Merge Sort
- python - 使用python在两个不同网络上的服务器和客户端?
- java - Tomcat 服务器之间的安全通信
- javascript - 如何降低此函数的对数成本
- kubernetes - 如何创建额外的 istio 入口网关?
- reactjs - 将基于类的组件更改为功能