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.
|
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 Integer getNumRows()
QueryOutputFormatter
getNumRows
in interface QueryOutputFormatter
public Long getFileSize()
QueryOutputFormatter
getFileSize
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
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.