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, setContextpublic void beginShard()
OutputWriterbeginShard 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
OutputWriterwrite in class OutputWriter<O>IOExceptionpublic boolean allowSliceRetry()
allowSliceRetry in class OutputWriter<O>public abstract long estimateMemoryRequirement()
OutputWriterestimateMemoryRequirement in class OutputWriter<O>Copyright © 2015 Google. All rights reserved.