org.apache.lens.lib.query
Class FileSerdeFormatter
java.lang.Object
org.apache.lens.lib.query.AbstractOutputFormatter
org.apache.lens.lib.query.WrappedFileFormatter
org.apache.lens.lib.query.FileSerdeFormatter
- All Implemented Interfaces:
- InMemoryOutputFormatter, QueryOutputFormatter
public class FileSerdeFormatter
- extends WrappedFileFormatter
- implements InMemoryOutputFormatter
File format which provides implementation for 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 Text
FileSerdeFormatter
public FileSerdeFormatter()
- Instantiates a new file serde formatter.
init
public void init(QueryContext ctx,
LensResultSetMetadata metadata)
throws IOException
- Description copied from interface:
QueryOutputFormatter
- Initialize the formatter.
- Specified by:
init
in interface QueryOutputFormatter
- Overrides:
init
in class WrappedFileFormatter
- Parameters:
ctx
- The QueryContext
objectmetadata
- LensResultSetMetadata
object
- Throws:
IOException
- Signals that an I/O exception has occurred.
writeRow
public void writeRow(ResultRow row)
throws IOException
- Description copied from interface:
InMemoryOutputFormatter
- Write a row of the result.
- Specified by:
writeRow
in interface InMemoryOutputFormatter
- Parameters:
row
- ResultRow
object
- Throws:
IOException
- Signals that an I/O exception has occurred.
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.