public class RollingDataWriter<T>
extends java.lang.Object
| Constructor and Description | 
|---|
| RollingDataWriter(FileWriterFactory<T> writerFactory,
                 OutputFileFactory fileFactory,
                 FileIO io,
                 long targetFileSizeInBytes,
                 PartitionSpec spec,
                 StructLike partition) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | addResult(DataWriteResult result) | 
| protected DataWriteResult | aggregatedResult() | 
| void | close() | 
| java.lang.CharSequence | currentFilePath() | 
| long | currentFileRows() | 
| long | length()Returns the number of bytes that were currently written by this writer. | 
| protected DataWriter<T> | newWriter(EncryptedOutputFile file) | 
| protected void | openCurrentWriter() | 
| protected StructLike | partition() | 
| R | result()Returns a result that contains information about written  DataFiles orDeleteFiles. | 
| protected PartitionSpec | spec() | 
| void | write(T row)Writes a row to a predefined spec/partition. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic RollingDataWriter(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes, PartitionSpec spec, StructLike partition)
protected DataWriter<T> newWriter(EncryptedOutputFile file)
protected void addResult(DataWriteResult result)
protected DataWriteResult aggregatedResult()
protected PartitionSpec spec()
protected StructLike partition()
public java.lang.CharSequence currentFilePath()
public long currentFileRows()
public long length()
FileWriterlength in interface FileWriter<T,R>public void write(T row)
FileWriterwrite in interface FileWriter<T,R>row - a data or delete recordprotected void openCurrentWriter()
public void close()
           throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic final R result()
FileWriterDataFiles or DeleteFiles.
 The result is valid only after the writer is closed.result in interface FileWriter<T,R>