Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 04-08-2016 09:39 AM - edited 09-16-2022 03:12 AM
Hi,
in the Cloudera Quickstart VM I am trying to submit requests using WebHDFS, but everything I put a HTTP PUT operation in the browser the following error appears (example shows operation "MKDIRS"):
http://XX.XX.XX.XX:50070/webhdfs/v1/mnt/cloudera/hadoop/user/hive/warehouse/mapreduce?op=MKDIRS
{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"Invalid value for webhdfs parameter \"op\": No enum constant org.apache.hadoop.hdfs.web.resources.GetOpParam.Op.MKDIRS"}}
It looks like WebHDFS is searching for PUT operations in the GET library.
No enum constant org.apache.hadoop.hdfs.web.resources.GetOpParam.Op.MKDIRS
I appreciate any help on this.
Thanks,
Matthias
Created on 04-12-2016 11:51 AM - edited 04-12-2016 11:52 AM
"I am putting the following HTTP URL in the address bar, e.g. "
the URL that you type in the address bar is translated into GET by the web browser, not a PUT method. You could use a REST client (web browser) plugin to assist your with submitting PUT/POST/DELETE methods from your browser.
Created 04-08-2016 11:25 AM
> but everything I put a HTTP PUT operation in the browser
Can you clarify how you are submitting PUT request from the browser, so we can reproduce it in-house.
Try the following from a linux terminal
#PUT
# curl -i -X PUT "http://XX.XX.XX.XX:50070/webhdfs/v1/tmp/mapreduce?op=MKDIRS"
#GET
# curl -i -X GET "http://XX.XX.XX.XX:50070/webhdfs/v1/tmp?op=LISTSTATUS"
Reference:
Created 04-09-2016 11:20 AM
From the browser I am using the following request:
http://xx.xx.xx.xx:50070/webhdfs/v1/mnt/cloudera/hadoop/user/hive/warehouse/mapreduce?op=MKDIRS
From the linux terminal it's working (as you mentioned).
Created 04-12-2016 06:43 AM
Please let me know when you have tested in inhouse. I have also tested it on another (self-installed) system (OS Ubuntu) and I am getting the same error:
Request in the browser:
http://localhost:50070/webhdfs/v1/tmp/test1?op=MKDIRS
Answer in the browser:
{"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"Invalid value for webhdfs parameter \"op\": No enum constant org.apache.hadoop.hdfs.web.resources.GetOpParam.Op.MKDIRS"}}
Thanks,
Matthias
Created 04-12-2016 10:30 AM
" I put a HTTP PUT operation in the browser "
Can you elaborate how you use HTTP PUT in your web browser? Please write down the steps you are using to do this, for example are you using a browser plugin, if so which?
Created on 04-12-2016 11:29 AM - edited 04-12-2016 11:35 AM
I am using the WebHDFS REST API as described in
https://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-hdfs/WebHDFS.html
I am putting the following HTTP URL in the address bar, e.g.
http://localhost:50070/webhdfs/v1/tmp/test1?op=MKDIRS
Created on 04-12-2016 11:51 AM - edited 04-12-2016 11:52 AM
"I am putting the following HTTP URL in the address bar, e.g. "
the URL that you type in the address bar is translated into GET by the web browser, not a PUT method. You could use a REST client (web browser) plugin to assist your with submitting PUT/POST/DELETE methods from your browser.
Created 04-14-2016 05:42 AM
Thanks a lot, it' working now (maybe you could include this in the description of how to use the WebHDFS in th link above).
Created 04-15-2016 05:48 AM
Sometimes my namenode stops when I try to login with browser
localhost:50070.
What could be the reson for it?.
Created 06-20-2016 03:38 AM
As another user said: Port 50070 has stopped working. What can people who have this problem do? I see a scaring lack of support in the questions I have browsed regarding this issue.