accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Billie J Rinaldi <billie.j.rina...@ugov.gov>
Subject Re: Scan and display entire row
Date Thu, 24 May 2012 14:01:46 GMT
On Thursday, May 24, 2012 9:42:01 AM, "Christopher M. Colclough" <Chris.Colclough@jhuapl.edu>
wrote:
> New to Accumulo and very much in the process of learning the API.
> 
> 
> 
> I’ve written a scanner to return the map of <Key,Value> pairs, but it
> returns only the table key:table value. I’d like to have it return the
> entire row from the table, just like the scan operator does when using
> the Accumulo shell. What class/method should I use to do this?
> 
> 
> 
> Current environment is Accumulo 1.3.5

I need more information about what you're trying to do.  The "scan" command in the shell just
uses a Scanner, so the same things will be returned in both.  Are you trying to get a single
row back from the Scanner?  If so, you can say scanner.setRange(new Range(row)).  If you are
trying to iterate over rows, in Accumulo 1.4 you will be able to wrap the scanner in a RowIterator,
which implements Iterator<Iterator<Entry<Key,Value>>>.

Billie

Mime
View raw message