T
- to indicate the record data type.public interface TaskWriter<T>
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
abort()
Close the writer and delete the completed files if possible when aborting.
|
WriteResult |
complete()
Close the writer and get the completed data and delete files.
|
default DataFile[] |
dataFiles()
Close the writer and get the completed data files, it requires that the task writer would produce data files only.
|
void |
write(T row)
Write the row into the data files.
|
void write(T row) throws java.io.IOException
java.io.IOException
void abort() throws java.io.IOException
java.io.IOException
- if any IO error happen.default DataFile[] dataFiles() throws java.io.IOException
java.io.IOException
WriteResult complete() throws java.io.IOException
java.io.IOException