com.splout.db.hadoop
Interface RecordProcessor

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IdentityRecordProcessor, PageCountsRecordProcessor

public interface RecordProcessor
extends java.io.Serializable

A custom Java business logic piece that can be implemented by the user and passed to a TableInput. Here we can implement a custom filter or processor without needing to use the Hadoop/Pangool API directly.

The input Tuple will have the Schema of the file being processed. The returned Tuple must have the same Schema than the Table being created.


Method Summary
 com.datasalt.pangool.io.ITuple process(com.datasalt.pangool.io.ITuple record, CounterInterface context)
          Custom Java business logic can be implemented here.
 

Method Detail

process

com.datasalt.pangool.io.ITuple process(com.datasalt.pangool.io.ITuple record,
                                       CounterInterface context)
                                       throws java.lang.Throwable
Custom Java business logic can be implemented here. The record contains the parsed fields and can be manipulated. The return can be used to filter out the record if needed (by returning null). So, this function serves as both a filter and a custom record processor.

The input Tuple will have the Schema of the file being processed. The returned Tuple must have the same Schema than the Table being created.

Throws:
java.lang.Throwable


Copyright © 2012-2013 Datasalt Systems S.L.. All Rights Reserved.