0

I am trying this command on my hadoop cluster (Cloudera 5.4.1)

curl -i http://webhdfs:50075/webhdfs/v1/user/admin/test/test.txt?user.name=admin&op=OPEN&namenoderpcaddress=namenode:8022; echo

Here I have confirmed that webhdfs, namenode machine names are all correct and ports 50075 and 8022 are correct.

But I get an error

Cache-Control: no-cache
Expires: Tue, 24 Nov 2015 15:49:42 GMT
Date: Tue, 24 Nov 2015 15:49:42 GMT
Pragma: no-cache
Expires: Tue, 24 Nov 2015 15:49:42 GMT
Date: Tue, 24 Nov 2015 15:49:42 GMT
Pragma: no-cache
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26.cloudera.4)

{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":
"java.lang.IllegalArgumentException","message":"namenoderpcaddress is not specified."}}
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373

1 Answers1

0

I was able to resolve the problem. when accessing webhdfs the URL should point to the name node. So rather than saying datanode:50075 you should say namename:50070

so I change my URL to

curl -i http://namenode:50070/webhdfs/v1/user/admin/test/test.txt?op=GETFILESTATUS; echo

how did I find "50070"? in your cloudera manager search for "NameNode Web UI Port"

Knows Not Much
  • 30,395
  • 60
  • 197
  • 373