JSON doesn't support octal numbers, so to encode privileges, its best to encode the privilege numbers as strings:
Needs to be
Then, we can easily use Short.decode(..) to read in octal encoded numbers. The short value can then be passed properly to the constructor of FsPermission.
This is fixed in https://issues.apache.org/jira/secure/attachment/12634808/BIGTOP-952.patch , but just wanted to create a separate placeholder JIRA while
BIGTOP-952 is still pending.