Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/19458#discussion_r144450997
--- Diff:
core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala ---
@@ -100,7 +100,16 @@ private[spark] class DiskBlockManager(conf: SparkConf,
deleteFilesOnStop: Boolea
/** List all the blocks currently stored on disk by the disk manager. */
def getAllBlocks(): Seq[BlockId] = {
- getAllFiles().map(f => BlockId(f.getName))
+ getAllFiles().flatMap { f =>
+ val blockId = BlockId.guess(f.getName)
--- End diff --
It looks not so necessary to define a new method `guess` for the use here
only. I think here we can still use `apply` and catch/log the exception. In
another word, we can simply changes `apply()` and use it here, defining new
`guess` method is not so necessary.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]