Commit 16b7b40
committed
[SPARK-24948][SHS] Delegate check access permissions to the file system
In `SparkHadoopUtil. checkAccessPermission`, we consider only basic permissions in order to check wether a user can access a file or not. This is not a complete check, as it ignores ACLs and other policies a file system may apply in its internal. So this can result in returning wrongly that a user cannot access a file (despite he actually can).
The PR proposes to delegate to the filesystem the check whether a file is accessible or not, in order to return the right result. A caching layer is added for performance reasons.
modified UTs
Author: Marco Gaido <[email protected]>
Closes #21895 from mgaido91/SPARK-24948.1 parent a5624c7 commit 16b7b40
File tree
4 files changed
+78
-130
lines changed- core/src
- main/scala/org/apache/spark/deploy
- history
- test/scala/org/apache/spark/deploy
- history
4 files changed
+78
-130
lines changedLines changed: 0 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | 381 | | |
404 | 382 | | |
405 | 383 | | |
| |||
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
132 | 154 | | |
133 | 155 | | |
134 | 156 | | |
| |||
326 | 348 | | |
327 | 349 | | |
328 | 350 | | |
329 | | - | |
| 351 | + | |
330 | 352 | | |
331 | 353 | | |
332 | 354 | | |
| |||
337 | 359 | | |
338 | 360 | | |
339 | 361 | | |
340 | | - | |
| 362 | + | |
341 | 363 | | |
342 | 364 | | |
343 | 365 | | |
344 | | - | |
| 366 | + | |
345 | 367 | | |
346 | | - | |
| 368 | + | |
| 369 | + | |
347 | 370 | | |
348 | 371 | | |
349 | 372 | | |
| |||
356 | 379 | | |
357 | 380 | | |
358 | 381 | | |
359 | | - | |
| 382 | + | |
360 | 383 | | |
361 | 384 | | |
362 | 385 | | |
| |||
365 | 388 | | |
366 | 389 | | |
367 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
368 | 395 | | |
369 | 396 | | |
370 | 397 | | |
| |||
587 | 614 | | |
588 | 615 | | |
589 | 616 | | |
| 617 | + | |
| 618 | + | |
590 | 619 | | |
591 | 620 | | |
592 | 621 | | |
| |||
Lines changed: 0 additions & 97 deletions
This file was deleted.
Lines changed: 41 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | | - | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
586 | 624 | | |
587 | 625 | | |
588 | 626 | | |
| |||
0 commit comments