Hello Kumar,

The WebHDFS REST API does not support recursive=true for the ACL operations.  
In general, recursive operations are driven by the Hadoop FsShell or some other 
client application and not the HDFS server side.  If you use the FsShell with a 
webhdfs:// URL and the -R option, then you will achieve a recursive setfacl 
through WebHDFS.  However, this is implemented as the client sending multiple 
HTTP requests to WebHDFS, not as a single HTTP call that performs recursion on 
the NameNode server side.  This is a design choice that helps control system 
load, so that the NameNode does not incur excessive locking and tie up handler 
threads doing recursive operations on a large sub-tree of the file system.

--Chris Nauroth

From: kumar r <kumarlear...@gmail.com<mailto:kumarlear...@gmail.com>>
Reply-To: "user@hadoop.apache.org<mailto:user@hadoop.apache.org>" 
<user@hadoop.apache.org<mailto:user@hadoop.apache.org>>
Date: Wednesday, July 15, 2015 at 12:31 AM
To: "user@hadoop.apache.org<mailto:user@hadoop.apache.org>" 
<user@hadoop.apache.org<mailto:user@hadoop.apache.org>>
Subject: HDFS ACL recursive not working for WEBHDFS REST API

Working on Hadoop-2.6.0, enabled HDFS ACLs. When trying through command line, 
recursive -R working correctly but when using REST API, its not working


hadoop fs -setfacl -x -R default:group:HadoopUsers /test1

The above command working correctly but when trying with REST API, recursive 
not working. ACL removed only for specified directory "test1" but not for sub 
directories.


curl -i -X PUT 
"http://<HOST>:<PORT>/webhdfs/v1/test1?op=REMOVEACLENTRIES&aclspec=default:group:HadoopUsers:&recursive=true

Do i missed anything? How to use recursive in REST API?


Reply via email to