This project has retired. For details please refer to its Attic page.
FilePersistentFormatter (Lens 2.0.1-beta-incubating API)

org.apache.lens.lib.query
Class FilePersistentFormatter

java.lang.Object
  extended by org.apache.lens.lib.query.AbstractOutputFormatter
      extended by org.apache.lens.lib.query.WrappedFileFormatter
          extended by org.apache.lens.lib.query.FilePersistentFormatter
All Implemented Interfaces:
PersistedOutputFormatter, QueryOutputFormatter

public class FilePersistentFormatter
extends WrappedFileFormatter
implements PersistedOutputFormatter

File formatter for PersistedOutputFormatter

This is a WrappedFileFormatter which can wrap any FileFormatter.


Field Summary
static org.apache.commons.logging.Log LOG
          The Constant LOG.
 
Fields inherited from class org.apache.lens.lib.query.AbstractOutputFormatter
HEADER_TYPE
 
Constructor Summary
FilePersistentFormatter()
           
 
Method Summary
 void addRowsFromPersistedPath(org.apache.hadoop.fs.Path persistedDir)
          Add result rows from the persisted path.
 void init(QueryContext ctx, LensResultSetMetadata metadata)
          Initialize the formatter.
 
Methods inherited from class org.apache.lens.lib.query.WrappedFileFormatter
close, commit, getEncoding, getFinalOutputPath, getNumRows, getTmpPath, writeFooter, writeHeader
 
Methods inherited from class org.apache.lens.lib.query.AbstractOutputFormatter
getMetadata
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lens.server.api.query.QueryOutputFormatter
close, commit, getFinalOutputPath, getMetadata, getNumRows, writeFooter, writeHeader
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
The Constant LOG.

Constructor Detail

FilePersistentFormatter

public FilePersistentFormatter()
Method Detail

init

public void init(QueryContext ctx,
                 LensResultSetMetadata metadata)
          throws IOException
Description copied from interface: QueryOutputFormatter
Initialize the formatter.

Specified by:
init in interface QueryOutputFormatter
Overrides:
init in class WrappedFileFormatter
Parameters:
ctx - The QueryContext object
metadata - LensResultSetMetadata object
Throws:
IOException - Signals that an I/O exception has occurred.

addRowsFromPersistedPath

public void addRowsFromPersistedPath(org.apache.hadoop.fs.Path persistedDir)
                              throws IOException
Description copied from interface: PersistedOutputFormatter
Add result rows from the persisted path.

Specified by:
addRowsFromPersistedPath in interface PersistedOutputFormatter
Parameters:
persistedDir - the persisted path
Throws:
IOException - Signals that an I/O exception has occurred.


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.