fateh288 opened a new pull request, #6674: URL: https://github.com/apache/hadoop/pull/6674
useful for testing auth frameworks such as Ranger <!-- Thanks for sending a pull request! 1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute 2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'. --> ### Description of PR The NNThroughputBenchmark can only be used with hdfs user or any user with super user privileges since entering/exiting safemode is a privileged operation. However, when using super user, ACL checks are skipped. Hence it renders the tool to be useless when testing namenode performance along with authorization frameworks such as Apache Ranger / any other authorization frameworks. An optional argument such as -nonSuperUser can be used to skip the statements such as entering / exiting safemode. This optional argument makes the tool useful for incorporating authorization frameworks into the performance estimation flows. ### How was this patch tested? 1) Unit tests defined in TestNNThroughputBenchmark worked after the patch was applied 2) Added new unit test case 3) Tried some commands such to open files which worked both with and without -nonSuperUser option (in a cluster) e.g. hadoop org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark -op open -threads 100 -files 100000 -filesPerDir 10000 -keepResults [-nonSuperUser] ### For code changes: - [YES ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [N/A ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [N/A ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [N/A ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org