I'm an idiot...I was using wrong port. Thanks for the reply! -----Original Message----- From: Arpit Gupta [mailto:ar...@hortonworks.com] Sent: Wednesday, July 18, 2012 4:24 PM To: common-user@hadoop.apache.org Subject: Re: REST API returning op not supported
Hi Corbett, Make sure that the port you are using is the namenode http port, it should be the same port that you use to access the namenode ui. Check the property "dfs.http.address" in your hdfs-site.xml. It defaults to 50070. 50075 is the default http port for the datanode. If you are using the correct port then can you try running the following command bin/hadoop --config your_conf_dir dfs -ls webhdfs://my-hadoop-host:50075/ and see if that works or not? Could you also share the namenode logs from when these commands were run. Make sure that the property "dfs.webhdfs.enabled" is set to true on the name node and the datanodes. Also take a look at http://hadoop.apache.org/common/docs/r1.0.3/webhdfs.html#Authentication and use the appropriate call based on whether you are on a secure cluster or not. -- Arpit Gupta Hortonworks Inc. http://hortonworks.com/ On Jul 18, 2012, at 1:48 PM, Corbett Martin wrote: > Hadoop newbie here... > > Trying to make a REST call from curl but no matter what I try I'm always > getting this exception: > > curl -i -X PUT > "http://my-hadoop-host:50075/webhdfs/v1/user/hduser/foo?op=MKDIRS" > > HTTP/1.1 400 Bad Request > Content-Type: application/json > Transfer-Encoding: chunked > Server: Jetty(6.1.26) > > {"RemoteException":{"exception":"UnsupportedOperationException","javaC > lassName":"java.lang.UnsupportedOperationException","message":"op=MKDI > RS is not supported"}} > > Same result different operation: > > curl -i "http://my-hadoop-host:50075/webhdfs/v1/user/hduser?op=LISTSTATUS" > HTTP/1.1 400 Bad Request > Content-Type: application/json > Transfer-Encoding: chunked > Server: Jetty(6.1.26) > > {"RemoteException":{"exception":"UnsupportedOperationException","javaC > lassName":"java.lang.UnsupportedOperationException","message":"op=LIST > STATUS is not supported"}} > > Any ideas what's wrong? Running Hadoop 1.0.2 with this in my > hdfs-site.xml > > <property> > <name>dfs.webhdfs.enabled</name> > <value>true</value> > <description>Enable or disable webhdfs. Defaults to > false</description> </property> > > Thanks in advance > > > ________________________________ > This message and its contents (to include attachments) are the property of > National Health Systems, Inc. and may contain confidential and proprietary > information. This email and any files transmitted with it are intended solely > for the use of the individual or entity to whom they are addressed. You are > hereby notified that any unauthorized disclosure, copying, or distribution of > this message, or the taking of any unauthorized action based on information > contained herein is strictly prohibited. Unauthorized use of information > contained herein may subject you to civil and criminal prosecution and > penalties. If you are not the intended recipient, you should delete this > message immediately and notify the sender immediately by telephone or by > replying to this transmission. This message and its contents (to include attachments) are the property of National Health Systems, Inc. and may contain confidential and proprietary information. This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. You are hereby notified that any unauthorized disclosure, copying, or distribution of this message, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately and notify the sender immediately by telephone or by replying to this transmission.