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 |
|---|---|
Long |
getFileSize()
Get size of the resultset file.
|
String |
getFinalOutputPath()
Get final location where formatted output is available
|
Integer |
getNumRows()
Get total number of rows in result.
|
void |
init(QueryContext ctx,
LensResultSetMetadata metadata)
Initialize the formatter.
|
void |
readExternal(ObjectInput in) |
void |
writeExternal(ObjectOutput out) |
void |
writeFooter()
Write the footer.
|
void |
writeHeader()
Write the header.
|
getMetadataequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncoding, getTmpPath, setupOutputs, writeFooter, writeHeader, writeRowclose, commitpublic void init(QueryContext ctx, LensResultSetMetadata metadata) throws IOException
QueryOutputFormatterinit in interface QueryOutputFormatterinit in class AbstractOutputFormatterctx - The QueryContext objectmetadata - LensResultSetMetadata objectIOException - Signals that an I/O exception has occurred.public Integer getNumRows()
QueryOutputFormattergetNumRows in interface QueryOutputFormatterpublic Long getFileSize()
QueryOutputFormattergetFileSize in interface QueryOutputFormatterpublic void writeHeader()
throws IOException
QueryOutputFormatterwriteHeader in interface QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public void writeFooter()
throws IOException
QueryOutputFormatterwriteFooter in interface QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public String getFinalOutputPath()
QueryOutputFormattergetFinalOutputPath in interface QueryOutputFormatterpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2014–2016 Apache Software Foundation. All rights reserved.