public class DiskBlockObjectWriter extends BlockObjectWriter implements Logging
Constructor and Description |
---|
DiskBlockObjectWriter(BlockId blockId,
java.io.File file,
Serializer serializer,
int bufferSize,
scala.Function1<java.io.OutputStream,java.io.OutputStream> compressStream,
boolean syncWrites,
org.apache.spark.executor.ShuffleWriteMetrics writeMetrics) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commitAndClose()
Flush the partial writes and commit them as a single atomic block.
|
FileSegment |
fileSegment()
Returns the file segment of committed data that this Writer has written.
|
void |
flush() |
boolean |
isOpen() |
BlockObjectWriter |
open() |
void |
revertPartialWritesAndClose()
Reverts writes that haven't been flushed yet.
|
void |
write(Object value)
Writes an object.
|
blockId
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 DiskBlockObjectWriter(BlockId blockId, java.io.File file, Serializer serializer, int bufferSize, scala.Function1<java.io.OutputStream,java.io.OutputStream> compressStream, boolean syncWrites, org.apache.spark.executor.ShuffleWriteMetrics writeMetrics)
public BlockObjectWriter open()
open
in class BlockObjectWriter
public void close()
close
in class BlockObjectWriter
public boolean isOpen()
isOpen
in class BlockObjectWriter
public void commitAndClose()
BlockObjectWriter
commitAndClose
in class BlockObjectWriter
public void revertPartialWritesAndClose()
BlockObjectWriter
revertPartialWritesAndClose
in class BlockObjectWriter
public void write(Object value)
BlockObjectWriter
write
in class BlockObjectWriter
public FileSegment fileSegment()
BlockObjectWriter
fileSegment
in class BlockObjectWriter
public void flush()