-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-36516][SQL] Support File Metadata Cache for ORC #33748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
45f4827
support orc file meta cache
LuciferYang a74c793
remove ForTailCacheReader
LuciferYang 1a9bd3b
rename test case
LuciferYang 30df269
remove private[sql] and add comments
LuciferYang 42d2bfd
Reduce method encapsulation
LuciferYang 0e6c52b
use PrivateMethodTester
LuciferYang 95bae3c
add a configable maximumSize
LuciferYang ebb7e0b
rename config
LuciferYang c36a569
move test
LuciferYang b02de85
update benchmark result
LuciferYang 406f91c
revert config name
LuciferYang 3b15a82
add compile same type
LuciferYang 2b99983
update mirco bench
LuciferYang 82ddf4f
change the default value of ttlSinceLastAccess
LuciferYang 1dd174e
change the default value of ttlSinceLastAccess
LuciferYang a339b1b
update conf doc to add Warning
LuciferYang 7153d2a
use a list config
LuciferYang c3838e6
Add checkValue to spark.sql.fileMetaCache.enabledSourceList and test …
LuciferYang 59d5bb9
change to use guava cache and update benchmark
LuciferYang 4adeb62
rename test case
LuciferYang e5f9497
add SEC to ttl
LuciferYang ec8fa1c
Revert "change to use guava cache and update benchmark"
LuciferYang db90daf
Revert "Revert "change to use guava cache and update benchmark""
LuciferYang 7327fdb
Merge branch 'upmaster' into SPARK-36516
LuciferYang 2907b2c
Merge branch 'master' of github.com:apache/spark into SPARK-36516
LuciferYang a7eff43
Merge branch 'upmaster' into SPARK-36516
LuciferYang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
sql/core/benchmarks/FileMetaCacheReadBenchmark-jdk11-results.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| ================================================================================================ | ||
| count(*) From 100 files | ||
| ================================================================================================ | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 218 224 4 24.1 41.5 1.0X | ||
| count(*): fileMetaCacheEnabled = true 152 155 3 34.6 28.9 1.4X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 430 441 10 12.2 82.1 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 375 377 4 14.0 71.5 0.6X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 216 218 1 24.2 41.3 1.0X | ||
| count(*): fileMetaCacheEnabled = true 166 167 2 31.5 31.7 1.3X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 455 460 5 11.5 86.7 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 406 412 10 12.9 77.4 0.5X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 289 292 3 18.2 55.1 1.0X | ||
| count(*): fileMetaCacheEnabled = true 221 231 7 23.7 42.2 1.3X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 556 560 9 9.4 106.0 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 518 520 2 10.1 98.9 0.6X | ||
|
|
||
|
|
||
| ================================================================================================ | ||
| count(*) From 500 files | ||
| ================================================================================================ | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 774 777 4 6.8 147.5 1.0X | ||
| count(*): fileMetaCacheEnabled = true 532 547 12 9.8 101.6 1.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1344 1346 3 3.9 256.3 0.6X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1095 1104 12 4.8 208.9 0.7X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 798 854 95 6.6 152.2 1.0X | ||
| count(*): fileMetaCacheEnabled = true 659 664 3 8.0 125.6 1.2X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1482 1485 4 3.5 282.7 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1286 1320 49 4.1 245.2 0.6X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 882 919 54 5.9 168.3 1.0X | ||
| count(*): fileMetaCacheEnabled = true 678 726 42 7.7 129.3 1.3X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1680 1706 36 3.1 320.5 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1438 1440 4 3.6 274.2 0.6X | ||
|
|
||
|
|
||
| ================================================================================================ | ||
| count(*) From 1000 files | ||
| ================================================================================================ | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1475 1516 58 3.6 281.4 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1280 1285 7 4.1 244.2 1.2X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 2512 2519 9 2.1 479.2 0.6X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 2304 2305 2 2.3 439.4 0.6X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1514 1518 6 3.5 288.8 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1376 1377 2 3.8 262.4 1.1X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 2793 2797 5 1.9 532.8 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 2635 2646 15 2.0 502.7 0.6X | ||
|
|
||
| OpenJDK 64-Bit Server VM 11.0.12+7-LTS on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1621 1622 0 3.2 309.2 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1413 1424 17 3.7 269.4 1.1X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 3144 3150 9 1.7 599.6 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 2855 2873 25 1.8 544.6 0.6X | ||
|
|
95 changes: 95 additions & 0 deletions
95
sql/core/benchmarks/FileMetaCacheReadBenchmark-results.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| ================================================================================================ | ||
| count(*) From 100 files | ||
| ================================================================================================ | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 191 197 9 27.5 36.4 1.0X | ||
| count(*): fileMetaCacheEnabled = true 132 136 5 39.6 25.2 1.4X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 376 382 7 13.9 71.7 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 328 341 14 16.0 62.5 0.6X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 189 193 6 27.8 36.0 1.0X | ||
| count(*): fileMetaCacheEnabled = true 146 150 6 36.0 27.8 1.3X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 399 404 7 13.1 76.1 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 353 358 5 14.9 67.3 0.5X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 100 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 237 241 7 22.1 45.3 1.0X | ||
| count(*): fileMetaCacheEnabled = true 190 193 7 27.5 36.3 1.2X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 469 473 7 11.2 89.5 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 426 433 8 12.3 81.2 0.6X | ||
|
|
||
|
|
||
| ================================================================================================ | ||
| count(*) From 500 files | ||
| ================================================================================================ | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 643 653 9 8.1 122.7 1.0X | ||
| count(*): fileMetaCacheEnabled = true 438 446 7 12.0 83.6 1.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1163 1163 1 4.5 221.8 0.6X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 954 959 5 5.5 182.0 0.7X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 662 673 10 7.9 126.3 1.0X | ||
| count(*): fileMetaCacheEnabled = true 461 487 29 11.4 88.0 1.4X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1277 1278 0 4.1 243.7 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1050 1058 11 5.0 200.3 0.6X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 500 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 716 723 11 7.3 136.6 1.0X | ||
| count(*): fileMetaCacheEnabled = true 502 523 30 10.4 95.8 1.4X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 1449 1454 7 3.6 276.4 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1211 1218 11 4.3 230.9 0.6X | ||
|
|
||
|
|
||
| ================================================================================================ | ||
| count(*) From 1000 files | ||
| ================================================================================================ | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 10 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1249 1254 7 4.2 238.2 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1114 1116 3 4.7 212.4 1.1X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 2169 2176 9 2.4 413.8 0.6X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 1884 1903 26 2.8 359.4 0.7X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 50 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1286 1286 0 4.1 245.3 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1110 1135 35 4.7 211.7 1.2X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 2362 2372 14 2.2 450.6 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 2198 2199 1 2.4 419.2 0.6X | ||
|
|
||
| Java HotSpot(TM) 64-Bit Server VM 1.8.0_152-b16 on Linux 4.14.0_1-0-0-42 | ||
| Intel(R) Xeon(R) Gold 6271C CPU @ 2.60GHz | ||
| count(*) from 100 columns with 1000 files: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative | ||
| ---------------------------------------------------------------------------------------------------------------------------------- | ||
| count(*): fileMetaCacheEnabled = false 1351 1362 16 3.9 257.7 1.0X | ||
| count(*): fileMetaCacheEnabled = true 1169 1208 56 4.5 222.9 1.2X | ||
| count(*) with Filter: fileMetaCacheEnabled = false 2706 2712 9 1.9 516.1 0.5X | ||
| count(*) with Filter: fileMetaCacheEnabled = true 2428 2452 34 2.2 463.0 0.6X | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add
.checkValue? The valid value is onlyorcin this PR.After merging this PR, you can extend it to
parquetinside Parquet PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c3838e6 add
.checkValueand test case