4

I have HDFS running on an EC2 node (pseudo multi-node setup) and I use it to access files via the WebHDFS's REST API by doing a GET at e.g. this:

http: slash slash ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com:50070/webhdfs/v1/foo/bar.txt?op=OPEN

This gives me a temporary redirect to

http: slash slash ip-yy-yy-yy-yy.us-west-2.compute.internal:50075/webhdfs/v1/foo/bar.txt?op=OPEN&namenoderpcaddress=localhost:9000&offset=0

Here xx-xx-xx-xx is the public, static IP assigned to my instance and yy-yy-yy-yy is the local ip for the instance.

This makes the redirect fail because ip-yy-yy-yy-yy.us-west-2.compute.internal cannot be opened from the browser, obviously! I would want the redirect URL generated to have the static, public IP assigned to my instance, resolvable by the default public DNS.

Here is the list of HDFS configuration defaults but I can't understand what is causing this situation.

My hdfs-site.xml configs:

dfs.replication: 1
dfs.webhdfs.enabled:true

My core-site.xml configs:

fs.defaultFS: hdfs://localhost:9000

Any sort of help is appreciated, thanks!

0 Answers0