Webhdfs returns wrong datanode address

[亡魂溺海] 提交于 2019-12-11 01:59:46

问题


curl -i -X PUT "http://SomeHostname:50070/webhdfs/v1/file1?op=CREATE"
HTTP/1.1 307 TEMPORARY_REDIRECT
Content-Type: application/octet-stream
Location: http://sslave0:50075/webhdfs/v1/file1?op=CREATE&overwrite=false
Content-Length: 0
Server: Jetty(6.1.26)

here it return sslave0 for datanode, seem like an internal address to me


回答1:


With WebHDFS, the NameNode web interface @port 50070 in your case accepts the put request and assigns the metadata information about the file to be stored. It then returns a redirect to a Data Node address (the ssalve0:50075 address) where the actual Http PUT is completed.

Bottom line - the Name Node doesn't store any real data, only metadata. It's the Data Nodes which store the actual information for a file - hence the redirect

If you want to have a single proxy node by which you don't have to deal with the data nodes in this way, then you want to configure HttpFs instead.



来源:https://stackoverflow.com/questions/19936313/webhdfs-returns-wrong-datanode-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!