You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by kumar r <ku...@gmail.com> on 2015/07/15 09:31:57 UTC

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?

Re: HDFS ACL recursive not working for WEBHDFS REST API

Posted by Chris Nauroth <cn...@hortonworks.com>.
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 <ku...@gmail.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Wednesday, July 15, 2015 at 12:31 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@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?



Re: HDFS ACL recursive not working for WEBHDFS REST API

Posted by Chris Nauroth <cn...@hortonworks.com>.
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 <ku...@gmail.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Wednesday, July 15, 2015 at 12:31 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@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?



Re: HDFS ACL recursive not working for WEBHDFS REST API

Posted by Chris Nauroth <cn...@hortonworks.com>.
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 <ku...@gmail.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Wednesday, July 15, 2015 at 12:31 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@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?



Re: HDFS ACL recursive not working for WEBHDFS REST API

Posted by Chris Nauroth <cn...@hortonworks.com>.
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 <ku...@gmail.com>>
Reply-To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@hadoop.apache.org>>
Date: Wednesday, July 15, 2015 at 12:31 AM
To: "user@hadoop.apache.org<ma...@hadoop.apache.org>" <us...@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?