public abstract class WrappedFileFormatter extends AbstractOutputFormatter
FileFormatter, which can have implementations like HadoopFileFormatter or
ZipFileFormatter.HEADER_TYPE| Constructor and Description |
|---|
WrappedFileFormatter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the formatter.
|
void |
commit()
Commit the formatting.
|
String |
getEncoding() |
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.
|
org.apache.hadoop.fs.Path |
getTmpPath() |
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.
|
getMetadatapublic 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 void writeHeader()
throws IOException
QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public void writeFooter()
throws IOException
QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public Integer getNumRows()
QueryOutputFormatterpublic Long getFileSize()
QueryOutputFormatterpublic void commit()
throws IOException
QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public void close()
throws IOException
QueryOutputFormatterIOException - Signals that an I/O exception has occurred.public String getFinalOutputPath()
QueryOutputFormatterpublic org.apache.hadoop.fs.Path getTmpPath()
public String getEncoding()
public void writeExternal(ObjectOutput out) throws IOException
IOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionCopyright © 2014–2016 Apache Software Foundation. All rights reserved.