0

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:

  1. Is it better using viewfs in federation than using hdfs?
  2. Does viewfs support Rack Awareness & printTopology command?

I am new to HDFS cluster, hope could get advice from here.

1 Answer 1

0

You should use a new hadoop cilent ,and set the core-site.xml like this: property:fs.defaultFS value:hdfs://your active namenode host:port not viewfs protocol then you can use hdfs client comment

1
  • 1
    Welcome to serverfault. Your answer has some serious formatting issues. Please reformat it. I have removed your e-mail address. Have a look at the formating help: serverfault.com/help/formatting
    – MichelZ
    Apr 4, 2014 at 6:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .