Github user ConeyLiu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20026#discussion_r162803175
--- Diff: core/src/main/scala/org/apache/spark/storage/DiskStore.scala ---
@@ -152,7 +153,7 @@ private class DiskBlockData(
file: File,
blockSize: Long) extends BlockData {
- override def toInputStream(): InputStream = new FileInputStream(file)
+ override def toInputStream(): InputStream = new
NioBufferedFileInputStream(file)
--- End diff --
Hi @jerryshao, thanks for reviewing. This is inspired by #15408.
> the returned `InputStream` will be deserialized in `BlockManger`
This is not entirely correct. Sometimes we don't need deserialized, such as
network transmission. And also, this does not add extra work to
deserialization, but reduces the effort of network-like delivery.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]