O
- type of values accepted by this outputWriterT
- type of the output writer being written topublic abstract class SliceSegmentingOutputWriter<O,WriterT extends OutputWriter<O>> extends OutputWriter<O>
Constructor and Description |
---|
SliceSegmentingOutputWriter() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowSliceRetry() |
void |
beginShard()
Will be called once before any calls to write.
|
void |
beginSlice()
Creates a new writer.
|
protected abstract WriterT |
createWriter(int sliceNumber)
Creates a new writer.
|
void |
endSlice()
closes the current writer.
|
abstract long |
estimateMemoryRequirement()
Returns the estimated memory that will be used by this writer in bytes.
|
void |
write(O value)
Writes a value to the output.
|
cleanup, close, endShard, getContext, open, setContext
public void beginShard()
OutputWriter
beginShard
in class OutputWriter<O>
public void beginSlice() throws IOException
beginSlice
in class OutputWriter<O>
IOException
- in the event of failureprotected abstract WriterT createWriter(int sliceNumber)
public void endSlice() throws IOException
endSlice
in class OutputWriter<O>
IOException
- in the event of failurepublic void write(O value) throws IOException
OutputWriter
write
in class OutputWriter<O>
IOException
public boolean allowSliceRetry()
allowSliceRetry
in class OutputWriter<O>
public abstract long estimateMemoryRequirement()
OutputWriter
estimateMemoryRequirement
in class OutputWriter<O>
Copyright © 2015 Google. All rights reserved.