public abstract class OutputWriter
extends java.lang.Object
OutputWriter is used together with HadoopFsRelation for persisting rows to the
underlying file system. Subclasses of OutputWriter must provide a zero-argument constructor.
An OutputWriter instance is created and initialized when a new output file is opened on
executor side. This instance is used to persist rows to this single output file.
| Constructor and Description |
|---|
OutputWriter() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Closes the
OutputWriter. |
protected void |
initConverter(StructType dataSchema) |
abstract void |
write(Row row)
Persists a single row.
|
protected void |
writeInternal(org.apache.spark.sql.catalyst.InternalRow row) |
public abstract void write(Row row)
row - (undocumented)public abstract void close()
OutputWriter. Invoked on the executor side after all rows are persisted, before
the task output is committed.
protected void initConverter(StructType dataSchema)
protected void writeInternal(org.apache.spark.sql.catalyst.InternalRow row)