accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Leary <r...@bbn.com>
Subject Re: accumulo Scanner
Date Thu, 11 Dec 2014 12:55:25 GMT
One option is to implement a class extending the RowEncodingIterator: 
http://accumulo.apache.org/1.6/apidocs/org/apache/accumulo/core/iterators/user/RowEncodingIterator.html
<http://accumulo.apache.org/1.6/apidocs/org/apache/accumulo/core/iterators/user/RowEncodingIterator.html>

I personally have implementations that will automatically return a serialized protocol buffer
or thrift object based on keys in the data. I think it should be possible to implement an
iterator with rowEncoder and rowDecoder methods to convert to a JavaBean.


> On Dec 10, 2014, at 9:55 PM, Russ Weeks <rweeks@newbrightidea.com> wrote:
> 
> You can use the WholeRowIterator to get a map of all key/value pairs for a
> single row. It works as long as your row is small enough to fit in memory.
> 
> I don't know of any libraries convert between a row and a JavaBean. Typo[2]
> is the closest project I know of.
> 
> -Russ
> 
> 1:
> http://accumulo.apache.org/1.6/apidocs/org/apache/accumulo/core/iterators/user/WholeRowIterator.html
> 2:https://github.com/keith-turner/typo
> 
> On Wed, Dec 10, 2014 at 6:14 PM, panqingcui@163.com <panqingcui@163.com>
> wrote:
> 
>> HI
>> Scanner full table, but need the data in each row, is the rowkey of the
>> same
>> data, save data to JavaBean.
>> 
>> <http://apache-accumulo.1065345.n5.nabble.com/file/n12506/accumulo.png>
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://apache-accumulo.1065345.n5.nabble.com/accumulo-Scanner-tp12506.html
>> Sent from the Developers mailing list archive at Nabble.com.
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message