-
- Downloads
[SPARK-3151][BLOCK MANAGER] DiskStore.getBytes fails for files larger than 2GB
## What changes were proposed in this pull request? introduced `DiskBlockData`, a new implementation of `BlockData` representing a whole file. this is somehow related to [SPARK-6236](https://issues.apache.org/jira/browse/SPARK-6236) as well This class follows the implementation of `EncryptedBlockData` just without the encryption. hence: * `toInputStream` is implemented using a `FileInputStream` (todo: encrypted version actually uses `Channels.newInputStream`, not sure if it's the right choice for this) * `toNetty` is implemented in terms of `io.netty.channel.DefaultFileRegion` * `toByteBuffer` fails for files larger than 2GB (same behavior of the original code, just postponed a bit), it also respects the same configuration keys defined by the original code to choose between memory mapping and simple file read. ## How was this patch tested? added test to DiskStoreSuite and MemoryManagerSuite Author: Eyal Farago <eyal@nrgene.com> Closes #18855 from eyalfa/SPARK-3151.
Showing
- core/src/main/scala/org/apache/spark/storage/DiskStore.scala 59 additions, 20 deletionscore/src/main/scala/org/apache/spark/storage/DiskStore.scala
- core/src/test/scala/org/apache/spark/storage/DiskStoreSuite.scala 44 additions, 6 deletions.../test/scala/org/apache/spark/storage/DiskStoreSuite.scala
Please register or sign in to comment