I am using Rack Awareness technology in HDFS, I can use the following command to get topology:
hdfs dfsadmin -printTopology
Today, after setting up HDFS Federation and use viewfs instead of hdfs as defaultFS like this:
<!--
<property>
<name>fs.defaultFS</name>
<value>hdfs://namenode1:9000</value>
</property>
-->
<property>
<name>fs.defaultFS</name>
<value>viewfs:///</value>
</property>
<property>
<name>fs.viewfs.mounttable.default.link./ns1</name>
<value>hdfs://namenode1:9000</value>
</property>
<property>
<name>fs.viewfs.mounttable.default.link./ns2</name>
<value>hdfs://namenode2:9000</value>
</property>
I got error message:
hduser@namenode1:/usr/local/hadoop/etc/hadoop$ hdfs dfsadmin -printTopology
printTopology: FileSystem viewfs:/ is not an HDFS file system
Usage: java DFSAdmin [-printTopology]
So my questions are:
- Is it better using viewfs in federation than using hdfs?
- Does viewfs support Rack Awareness & printTopology command?
I am new to HDFS cluster, hope could get advice from here.