在 Hortonworks 沙盒 HDP 2.3_1 上执行以下命令时出现错误:
curl -i "http://localhost:50075/webhdfs/v1/queryresult/part-m-00000?op=OPEN
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 161
Connection: close
{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"java.net.UnknownHostException: null"}}
当我将端口更改为 50070 时,我收到一条消息"curl: (7) couldn't connect to host
“。
在我的 hdsf-site.xml 及其单节点 hadoop 集群中启用了 webhdfs 属性。
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
<final>true</final>
</property>