Description
If users don't specify the perm of an acl when using the FsShell's setfacl command, a fatal internal error ArrayIndexOutOfBoundsException will be thrown.
[root@hdfs-nfs ~]# hdfs dfs -setfacl -m user:bob: /user/hdfs/td1 -setfacl: Fatal internal error java.lang.ArrayIndexOutOfBoundsException: 2 at org.apache.hadoop.fs.permission.AclEntry.parseAclEntry(AclEntry.java:285) at org.apache.hadoop.fs.permission.AclEntry.parseAclSpec(AclEntry.java:221) at org.apache.hadoop.fs.shell.AclCommands$SetfaclCommand.processOptions(AclCommands.java:260) at org.apache.hadoop.fs.shell.Command.run(Command.java:154) at org.apache.hadoop.fs.FsShell.run(FsShell.java:255) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.fs.FsShell.main(FsShell.java:308) [root@hdfs-nfs ~]#
An improvement would be if it returned something like this:
[root@hdfs-nfs ~]# hdfs dfs -setfacl -m user:bob:rww /user/hdfs/td1
-setfacl: Invalid permission in <aclSpec> : user:bob:rww
Usage: hadoop fs [generic options] -setfacl [-R] [{-b|-k} {-m|-x <acl_spec>} <path>]|[--set <acl_spec> <path>]
[root@hdfs-nfs ~]#
Attachments
Attachments
Issue Links
- is broken by
-
HADOOP-10187 FsShell CLI: add getfacl and setfacl with minimal support for getting and setting ACLs.
- Resolved