Courage
Courage

Reputation: 543

how to show the hdfs root directory in hadoop?

I worked with hadoop 2.8.1, according to some reference( a lot of book and other online forum) that tell me where I could use 'hadoop fs -ls / ' to find the hdfs file system root. but while I type that command, the terminal show the local directory but not hdfs root.

what's wrong with this, thanks in advance.

Upvotes: 2

Views: 9246

Answers (1)

Mrgr8m4
Mrgr8m4

Reputation: 502

If you can execute hadoop version command and it returns correct information, it means that Hadoop was installed good.

I think there might be a problem with HDFS configuration. Try this:

  1. Locate core-site.xml file in your local file system. It should be located in /etc/hadoop/conf directory.
  2. Open core-site.xml file and locate this property:

    <property>
         <name>fs.defaultFS</name>
         <value>hdfs://<name-of-your-host>:8020</value>
         <final>true</final>
    </property>
    
  3. I suppose name parameter is wrong. You have to identify the address on which HDFS is running and update it in core-site.xml.

Upvotes: 3

Related Questions