0

i'm trying to see if delete option works over webhdfs :

http://ec2-ab-cd-ef-hi.compute-1.amazonaws.com:14000/webhdfs/v1/user/barak/barakFile.csv?op=DELETE&user.name=hadoop

but i get an error:

{"RemoteException":{"message":"Invalid HTTP GET operation [DELETE]",
"exception":"IOException","javaClassName":"java.io.IOException"}}

This file has all privilege ( 777 ) .

[hadoop@ip-172-99-9-99 ~]$ hadoop fs -ls hdfs:///user/someUser
Found 2 items
-rwxrwxrwx 1 hadoop hadoop 344 2015-12-10 08:33 hdfs:///user/someUser/someUser.csv

what else should i check for allowing in order to allow delete option over Amazon EMR WEBHDFS

Mark van Straten
  • 9,287
  • 3
  • 38
  • 57
2Big2BeSmall
  • 1,348
  • 3
  • 20
  • 40

2 Answers2

5

You need to use curl -i -X command like this

curl -i -X DELETE "http://ec2-**-**-**-***.compute-1.amazonaws.com:14000/webhdfs/v1/user/hadoop/hdfs-site.xml?op=DELETE&user.name=hadoop"
Durga Viswanath Gadiraju
  • 3,896
  • 2
  • 14
  • 21
0

I had the needed privileges for a file but didn't have all the needed privileges for the directory. changing permission for the entire Path solved it.

2Big2BeSmall
  • 1,348
  • 3
  • 20
  • 40