我无法创建新文件或目录,也无法列出现有文件或目录
我正在用下面的命令来做这个操作,你能建议一下吗
hduser@c:/usr/local/hadoop$ jps
8546 ResourceManager
9181 Jps
1503 NameNode
8674 NodeManager
4398 DataNode
hduser@c:/usr/local/hadoop$ bin/hadoop fs -ls /
ls: Couldn't create proxy provider null
hduser@c:/usr/local/hadoop$ bin/hadoop fs -mkdir /books
mkdir: Couldn't create proxy provider null
hduser@c:/usr/local/hadoop$
下面是我的 hdfs-site.xml
,我正在使用它。
<configuration>
<property>
<name>dfs.nameservices</name>
<value>mycluster</value>
</property>
<property>
<name>dfs.replicaion</name>
<value>2</value>
<description>to specifiy replication</description>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/h3iHA/name</value>
<final>true</final>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/h3iHA/data2</value>
<final>true</final>
</property>
<property>
<name>dfs.ha.namenodes.mycluster</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.mycluster.nn1</name>
<value>c:9000</value>
</property>
<property>
<name>dfs.namenode.rpc-address.mycluster.nn2</name>
<value>a:9000</value>
</property>
<property>
<name>dfs.namenode.http-address.mycluster.nn1</name>
<value>c:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.mycluster.nn2</name>
<value>a:50070</value>
</property>
<property>
<name>dfs.namenode.shared.edits.dir</name>
<value>file:///mnt/filer</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.mycluster</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.configuredFailoverProxyProvider</value>
</property>
<property>
<name>dfs.ha.fencing.methods</name>
<value>sshfence</value>
</property>
<property>
<name>dfs.ha.fencing.ssh.private-key-files</name>
<value>/home/hduser/.ssh/id_rsa</value>
</property>
<property>
<name>dfs.ha.fencing.methods</name>
<value>sshfence
shell(/bin/true)
</value>
</property>
</configuration>
核心文件,这对于两个节点都是相同的
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
</configuration>
1条答案
按热度按时间toiithl61#
为属性设置的java类名
dfs.client.failover.proxy.provider.mycluster
不正确。它是ConfiguredFailoverProxyProvider
而不是configuredFailoverProxyProvider
.在中编辑此属性的值
hdfs-site.xml
```dfs.client.failover.proxy.provider.mycluster
org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider