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
HBaseValueMapper
Map to values.
toValues
in interface HBaseValueMapper
tuple
- tupleresult
- HBase lookup result instanceException
public void declareOutputFields(OutputFieldsDeclarer declarer)
HBaseValueMapper
declares the output fields for the lookup bolt.
declareOutputFields
in interface HBaseValueMapper
Copyright © 2022 The Apache Software Foundation. All rights reserved.