Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private[spark] class DiskBlockManager(conf: SparkConf, deleteFilesOnStop: Boolea
/** Looks up a file by hashing it into one of our local subdirectories. */
// This method should be kept in sync with
// org.apache.spark.network.shuffle.ExternalShuffleBlockResolver#getFile().
def getFile(filename: String): File = {
private def getFile(filename: String): File = {
// Figure out which local directory it hashes to, and which subdirectory in that
val hash = Utils.nonNegativeHash(filename)
val dirId = hash % localDirs.length
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/org/apache/spark/storage/DiskStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private[spark] class DiskStore(
}

def getBytes(blockId: BlockId): BlockData = {
val file = diskManager.getFile(blockId.name)
val file = diskManager.getFile(blockId)
val blockSize = getSize(blockId)

securityManager.getIOEncryptionKey() match {
Expand All @@ -116,7 +116,7 @@ private[spark] class DiskStore(

def remove(blockId: BlockId): Boolean = {
blockSizes.remove(blockId.name)
val file = diskManager.getFile(blockId.name)
val file = diskManager.getFile(blockId)
if (file.exists()) {
val ret = file.delete()
if (!ret) {
Expand All @@ -129,7 +129,7 @@ private[spark] class DiskStore(
}

def contains(blockId: BlockId): Boolean = {
val file = diskManager.getFile(blockId.name)
val file = diskManager.getFile(blockId)
file.exists()
}

Expand Down