org.springframework.data.hadoop.hbase
Interface ResultsExtractor<T>
public interface ResultsExtractor<T>
Callback handling scanner results.
Implementations of this interface perform the actula work of extracting results from the
ResultScanner
but without having to worry about exception handling or resource management.
- Author:
- Costin Leau
Method Summary |
T |
extractData(org.apache.hadoop.hbase.client.ResultScanner results)
Implementations must implement this method to process the entire ResultScanner . |
extractData
T extractData(org.apache.hadoop.hbase.client.ResultScanner results)
throws java.lang.Exception
- Implementations must implement this method to process the entire
ResultScanner
.
- Parameters:
results
- ResultScanner
to extract data from. Implementations should not close this; it will be closed
automatically by the calling HbaseTemplate
- Returns:
- an arbitrary result object, or null if none (the extractor will typically be stateful in the latter case).
- Throws:
java.lang.Exception
- if an Hbase exception is encountered