|
|
Juan Moreno 2012-05-15, 15:56
Salutations!
How can Iterate over an entire table using the Java API? The documentation mentions using Ranges to scan portions of a table, but what about an entire table?
Thanks,
Juan
+
Juan Moreno 2012-05-15, 15:56
Jim Klucar 2012-05-15, 16:08
Just don't do anything. If you create a scanner object, it sets the default range to Range(null, null) so when you call Scanner.iterator() you will create an iterator that will cover the entire table. Calling the methods to set ranges or fetch columns just narrow the default range down, if you want everything just don't call those methods.
On Tue, May 15, 2012 at 11:56 AM, Juan Moreno <[EMAIL PROTECTED]> wrote: > Salutations! > > How can Iterate over an entire table using the Java API? > The documentation mentions using Ranges to scan portions of a table, but > what about an entire table? > > Thanks, > > Juan
+
Jim Klucar 2012-05-15, 16:08
Juan Moreno 2012-05-15, 16:13
That is awesome information, and worthy enough to be included in the Manual. Thanks so much.
On Tue, May 15, 2012 at 12:08 PM, Jim Klucar <[EMAIL PROTECTED]> wrote:
> Just don't do anything. If you create a scanner object, it sets the > default range to Range(null, null) so when you call Scanner.iterator() > you will create an iterator that will cover the entire table. Calling > the methods to set ranges or fetch columns just narrow the default > range down, if you want everything just don't call those methods. > > On Tue, May 15, 2012 at 11:56 AM, Juan Moreno > <[EMAIL PROTECTED]> wrote: > > Salutations! > > > > How can Iterate over an entire table using the Java API? > > The documentation mentions using Ranges to scan portions of a table, but > > what about an entire table? > > > > Thanks, > > > > Juan >
-- Juan Wellington Moreno *Software Engineer*
+
Juan Moreno 2012-05-15, 16:13
David Medinets 2012-05-15, 16:25
Sounds like an FAQ to me. The manual should be fairly limited in scope, I feel.
On Tue, May 15, 2012 at 12:13 PM, Juan Moreno <[EMAIL PROTECTED]> wrote: > That is awesome information, and worthy enough to be included in the Manual. > Thanks so much. > > > On Tue, May 15, 2012 at 12:08 PM, Jim Klucar <[EMAIL PROTECTED]> wrote: >> >> Just don't do anything. If you create a scanner object, it sets the >> default range to Range(null, null) so when you call Scanner.iterator() >> you will create an iterator that will cover the entire table. Calling >> the methods to set ranges or fetch columns just narrow the default >> range down, if you want everything just don't call those methods. >> >> On Tue, May 15, 2012 at 11:56 AM, Juan Moreno >> <[EMAIL PROTECTED]> wrote: >> > Salutations! >> > >> > How can Iterate over an entire table using the Java API? >> > The documentation mentions using Ranges to scan portions of a table, but >> > what about an entire table? >> > >> > Thanks, >> > >> > Juan > > > > > -- > Juan Wellington Moreno > Software Engineer
+
David Medinets 2012-05-15, 16:25
John Armstrong 2012-05-15, 16:29
On 05/15/2012 12:25 PM, David Medinets wrote: > Sounds like an FAQ to me. The manual should be fairly limited in scope, I feel.
Not sure it's a FAQ either. Maybe a "cookbook" of common use cases.
+
John Armstrong 2012-05-15, 16:29
Eric Newton 2012-05-15, 17:32
There's already an example that covers this case:
org.apache.accumulo.examples.simple.helloworld.ReadData
"Reads all data between two rows; all data after a given row; or all data in a table, depending on the number of arguments given." On Tue, May 15, 2012 at 12:29 PM, John Armstrong <[EMAIL PROTECTED]> wrote:
> On 05/15/2012 12:25 PM, David Medinets wrote: > >> Sounds like an FAQ to me. The manual should be fairly limited in scope, I >> feel. >> > > Not sure it's a FAQ either. Maybe a "cookbook" of common use cases. >
+
Eric Newton 2012-05-15, 17:32
Aaron Cordova 2012-05-15, 17:49
It should at least be clear in the client section of the manual that a 'table scan' is the default mode unless you scope the scan down via additional calls On May 15, 2012, at 10:25 AM, David Medinets wrote:
> Sounds like an FAQ to me. The manual should be fairly limited in scope, I feel. > > On Tue, May 15, 2012 at 12:13 PM, Juan Moreno > <[EMAIL PROTECTED]> wrote: >> That is awesome information, and worthy enough to be included in the Manual. >> Thanks so much. >> >> >> On Tue, May 15, 2012 at 12:08 PM, Jim Klucar <[EMAIL PROTECTED]> wrote: >>> >>> Just don't do anything. If you create a scanner object, it sets the >>> default range to Range(null, null) so when you call Scanner.iterator() >>> you will create an iterator that will cover the entire table. Calling >>> the methods to set ranges or fetch columns just narrow the default >>> range down, if you want everything just don't call those methods. >>> >>> On Tue, May 15, 2012 at 11:56 AM, Juan Moreno >>> <[EMAIL PROTECTED]> wrote: >>>> Salutations! >>>> >>>> How can Iterate over an entire table using the Java API? >>>> The documentation mentions using Ranges to scan portions of a table, but >>>> what about an entire table? >>>> >>>> Thanks, >>>> >>>> Juan >> >> >> >> >> -- >> Juan Wellington Moreno >> Software Engineer
+
Aaron Cordova 2012-05-15, 17:49
|
|