public class DiskBlockManager extends Object implements Logging
Block files are hashed among the directories listed in spark.local.dir (or in SPARK_LOCAL_DIRS, if it's set).
Constructor and Description |
---|
DiskBlockManager(BlockManager blockManager,
SparkConf conf) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsBlock(BlockId blockId)
Check if disk block manager has a block.
|
scala.Tuple2<TempLocalBlockId,java.io.File> |
createTempLocalBlock()
Produces a unique block id and File suitable for storing local intermediate results.
|
scala.Tuple2<TempShuffleBlockId,java.io.File> |
createTempShuffleBlock()
Produces a unique block id and File suitable for storing shuffled intermediate results.
|
scala.collection.Seq<BlockId> |
getAllBlocks()
List all the blocks currently stored on disk by the disk manager.
|
scala.collection.Seq<java.io.File> |
getAllFiles()
List all the files currently stored on disk by the disk manager.
|
java.io.File |
getFile(BlockId blockId) |
java.io.File |
getFile(String filename)
Looks up a file by hashing it into one of our local subdirectories.
|
java.io.File[] |
localDirs() |
void |
stop()
Cleanup local dirs and stop shuffle sender.
|
int |
subDirsPerLocalDir() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public DiskBlockManager(BlockManager blockManager, SparkConf conf)
public int subDirsPerLocalDir()
public java.io.File[] localDirs()
public java.io.File getFile(String filename)
public java.io.File getFile(BlockId blockId)
public boolean containsBlock(BlockId blockId)
public scala.collection.Seq<java.io.File> getAllFiles()
public scala.collection.Seq<BlockId> getAllBlocks()
public scala.Tuple2<TempLocalBlockId,java.io.File> createTempLocalBlock()
public scala.Tuple2<TempShuffleBlockId,java.io.File> createTempShuffleBlock()
public void stop()