public class WriteAheadLogBasedBlockHandler extends Object implements ReceivedBlockHandler, Logging
ReceivedBlockHandler
which
stores the received blocks in both, a write ahead log and a block manager.Constructor and Description |
---|
WriteAheadLogBasedBlockHandler(BlockManager blockManager,
int streamId,
StorageLevel storageLevel,
SparkConf conf,
org.apache.hadoop.conf.Configuration hadoopConf,
String checkpointDir,
Clock clock) |
Modifier and Type | Method and Description |
---|---|
static String |
checkpointDirToLogDir(String checkpointDir,
int streamId) |
void |
cleanupOldBlocks(long threshTime)
Cleanup old blocks older than the given threshold time
|
void |
stop() |
ReceivedBlockStoreResult |
storeBlock(StreamBlockId blockId,
ReceivedBlock block)
This implementation stores the block into the block manager as well as a write ahead log.
|
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 WriteAheadLogBasedBlockHandler(BlockManager blockManager, int streamId, StorageLevel storageLevel, SparkConf conf, org.apache.hadoop.conf.Configuration hadoopConf, String checkpointDir, Clock clock)
public static String checkpointDirToLogDir(String checkpointDir, int streamId)
public ReceivedBlockStoreResult storeBlock(StreamBlockId blockId, ReceivedBlock block)
storeBlock
in interface ReceivedBlockHandler
public void cleanupOldBlocks(long threshTime)
ReceivedBlockHandler
cleanupOldBlocks
in interface ReceivedBlockHandler
public void stop()