public abstract class WrappedFileFormatter extends AbstractOutputFormatter
FileFormatter
, which can have implementations like HadoopFileFormatter
or
ZipFileFormatter
.Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG.
|
HEADER_TYPE
Constructor and Description |
---|
WrappedFileFormatter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the formatter.
|
void |
commit()
Commit the formatting.
|
String |
getEncoding() |
String |
getFinalOutputPath()
Get final location where formatted output is available
|
int |
getNumRows()
Get total number of rows in result.
|
org.apache.hadoop.fs.Path |
getTmpPath() |
void |
init(QueryContext ctx,
LensResultSetMetadata metadata)
Initialize the formatter.
|
void |
writeFooter()
Write the footer.
|
void |
writeHeader()
Write the header.
|
getMetadata
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 void writeHeader() throws IOException
QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public void writeFooter() throws IOException
QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public int getNumRows()
QueryOutputFormatter
public void commit() throws IOException
QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public void close() throws IOException
QueryOutputFormatter
IOException
- Signals that an I/O exception has occurred.public String getFinalOutputPath()
QueryOutputFormatter
public org.apache.hadoop.fs.Path getTmpPath()
public String getEncoding()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.