3

I am trying to get files from hadoop using webhdfs, now the webhdfs is redirecting me to the datanodes. Its returning the hostnames in address , is there a way where we can make it return ip address instead of hostnames ?

user9040429
  • 690
  • 1
  • 8
  • 29

1 Answers1

1
dfs.datanode.hostname
Optional. The hostname for the Datanode containing this configuration file. 
Will be different for each machine. Defaults to current hostname.

In hdfs-site.xml, you can set dfs.datanode.hostname.

<property>
  <name>dfs.datanode.hostname</name>
  <value>IP-ADDRESS</value>
</property>

By doing this, webhdfs will return ip address of datanode.

김민우
  • 69
  • 5