Host and port to use to list a directory in hdfs
Check the value of property fs.defaultFS
in core-site.xml
this contains the ip-address/hostname and port on which NameNode daemon should bind to when it start's up.
I see that you are using hortonworks sandbox, here is the property in core-site.xml
and its located in /etc/hadoop/conf/core-site.xml
<property> <name>fs.defaultFS</name> <value>hdfs://sandbox.hortonworks.com:8020</value></property>
So, you could try something like this:
hadoop fs -ls hdfs://sandbox.hortonworks.com:8020/user/guest
Or you could also replace the ip address of sandbox.hortonworks.com
from its respective entry in /etc/hosts
, on my vm which looks something like this:
127.0.0.1 localhost.localdomain localhost192.168.1.3 sandbox.hortonworks.com sandbox
So, I could try this as well:
hadoop fs -ls hdfs://192.168.1.3:8020/user/guest