public abstract class AbstractFileFormatter extends AbstractOutputFormatter implements FileFormatter
FileFormatter
, which gets column details from AbstractOutputFormatter
.HEADER_TYPE
Constructor and Description |
---|
AbstractFileFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
getFinalOutputPath()
Get final location where formatted output is available
|
int |
getNumRows()
Get total number of rows in result.
|
void |
init(QueryContext ctx,
LensResultSetMetadata metadata)
Initialize the formatter.
|
void |
writeFooter()
Write the footer.
|
void |
writeHeader()
Write the header.
|
getMetadata
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEncoding, getTmpPath, setupOutputs, writeFooter, writeHeader, writeRow
close, commit
public void init(QueryContext ctx, LensResultSetMetadata metadata) throws IOException
QueryOutputFormatter
init
in interface QueryOutputFormatter
init
in class AbstractOutputFormatter
ctx
- The QueryContext
objectmetadata
- LensResultSetMetadata
objectIOException
- Signals that an I/O exception has occurred.public int getNumRows()
QueryOutputFormatter
getNumRows
in interface QueryOutputFormatter
public void writeHeader() throws IOException
QueryOutputFormatter
writeHeader
in interface QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public void writeFooter() throws IOException
QueryOutputFormatter
writeFooter
in interface QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public String getFinalOutputPath()
QueryOutputFormatter
getFinalOutputPath
in interface QueryOutputFormatter
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.