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.
|
blockIdequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic 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 BlockObjectWriterpublic void close()
close in class BlockObjectWriterpublic boolean isOpen()
isOpen in class BlockObjectWriterpublic void commitAndClose()
BlockObjectWritercommitAndClose in class BlockObjectWriterpublic void revertPartialWritesAndClose()
BlockObjectWriterrevertPartialWritesAndClose in class BlockObjectWriterpublic void write(Object value)
BlockObjectWriterwrite in class BlockObjectWriterpublic FileSegment fileSegment()
BlockObjectWriterfileSegment in class BlockObjectWriterpublic void flush()