public class FileSerdeFormatter extends WrappedFileFormatter implements InMemoryOutputFormatter
InMemoryOutputFormatter
This is a wrapped formatter, which serializes the rows of the result with configured serde. It would only accept the
Serde's whose serialization class is TextHEADER_TYPE
Constructor and Description |
---|
FileSerdeFormatter()
Instantiates a new file serde formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
init(QueryContext ctx,
LensResultSetMetadata metadata)
Initialize the formatter.
|
void |
writeRow(ResultRow row)
Write a row of the result.
|
close, commit, getEncoding, getFileSize, getFinalOutputPath, getNumRows, getTmpPath, readExternal, writeExternal, writeFooter, writeHeader
getMetadata
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, commit, getFileSize, getFinalOutputPath, getMetadata, getNumRows, writeFooter, writeHeader
readExternal, writeExternal
public FileSerdeFormatter()
public void init(QueryContext ctx, LensResultSetMetadata metadata) throws IOException
QueryOutputFormatter
init
in interface QueryOutputFormatter
init
in class WrappedFileFormatter
ctx
- The QueryContext
objectmetadata
- LensResultSetMetadata
objectIOException
- Signals that an I/O exception has occurred.public void writeRow(ResultRow row) throws IOException
InMemoryOutputFormatter
writeRow
in interface InMemoryOutputFormatter
row
- ResultRow
objectIOException
- Signals that an I/O exception has occurred.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.