[root@master hadoop]# hdfs dfs -mkdir /io
-mkdir: java.net.UnknownHostException: ns1
Usage:hadoop fs [generic options] -mkdir [-p] <path> ...
报错
检查hdfs-site.xml中
<property>
<name>dfs.ha.automatic-failover.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.ns1</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>