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