-
- Downloads
[SPARK-20172][CORE] Add file permission check when listing files in FsHistoryProvider
## What changes were proposed in this pull request? In the current Spark's HistoryServer we expected to get `AccessControlException` during listing all the files, but unfortunately it was not worked because we actually doesn't check the access permission and no other calls will throw such exception. What was worse is that this check will be deferred until reading files, which is not necessary and quite verbose, since it will be printed out the exception in every 10 seconds when checking the files. So here with this fix, we actually check the read permission during listing the files, which could avoid unnecessary file read later on and suppress the verbose log. ## How was this patch tested? Add unit test to verify. Author: jerryshao <sshao@hortonworks.com> Closes #17495 from jerryshao/SPARK-20172.
Showing
- core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 23 additions, 0 deletions.../main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala
- core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala 11 additions, 17 deletions...a/org/apache/spark/deploy/history/FsHistoryProvider.scala
- core/src/test/scala/org/apache/spark/deploy/SparkHadoopUtilSuite.scala 97 additions, 0 deletions.../scala/org/apache/spark/deploy/SparkHadoopUtilSuite.scala
- core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala 14 additions, 2 deletions.../apache/spark/deploy/history/FsHistoryProviderSuite.scala
Loading
Please register or sign in to comment