org.apache.lens.lib.query
Interface FileFormatter

All Known Implementing Classes:
AbstractFileFormatter, HadoopFileFormatter, ZipFileFormatter

public interface FileFormatter

File formatter interface which is wrapped in WrappedFileFormatter.


Method Summary
 String getEncoding()
          Get the result encoding, if any
 org.apache.hadoop.fs.Path getTmpPath()
          Get the temporary path of the result, if any
 void setupOutputs()
          Setup outputs for file formatter.
 void writeFooter(String footer)
          Write the footer passed.
 void writeHeader(String header)
          Write the header passed.
 void writeRow(String row)
          Write the row passed.
 

Method Detail

setupOutputs

void setupOutputs()
                  throws IOException
Setup outputs for file formatter.

Throws:
IOException - Signals that an I/O exception has occurred.

writeHeader

void writeHeader(String header)
                 throws IOException
Write the header passed.

Parameters:
header - the header
Throws:
IOException - Signals that an I/O exception has occurred.

writeFooter

void writeFooter(String footer)
                 throws IOException
Write the footer passed.

Parameters:
footer - the footer
Throws:
IOException - Signals that an I/O exception has occurred.

writeRow

void writeRow(String row)
              throws IOException
Write the row passed.

Parameters:
row - the row
Throws:
IOException - Signals that an I/O exception has occurred.

getTmpPath

org.apache.hadoop.fs.Path getTmpPath()
Get the temporary path of the result, if any

Returns:

getEncoding

String getEncoding()
Get the result encoding, if any

Returns:


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