public class WordCountValueMapper extends Object implements HBaseValueMapper
Takes a Hbase result and returns a value list that has a value instance for each column and corresponding value. So if the result from Hbase was
WORD, COUNT apple, 10 bannana, 20
this will return
[WORD, apple]
[COUNT, 10] [WORD, banana]
[COUNT, 20] | Constructor and Description |
|---|
WordCountValueMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer)
declares the output fields for the lookup bolt.
|
List<Values> |
toValues(ITuple tuple,
org.apache.hadoop.hbase.client.Result result)
Map to values.
|
public List<Values> toValues(ITuple tuple, org.apache.hadoop.hbase.client.Result result) throws Exception
HBaseValueMapperMap to values.
toValues in interface HBaseValueMappertuple - tupleresult - HBase lookup result instanceExceptionpublic void declareOutputFields(OutputFieldsDeclarer declarer)
HBaseValueMapperdeclares the output fields for the lookup bolt.
declareOutputFields in interface HBaseValueMapperCopyright © 2021 The Apache Software Foundation. All rights reserved.