accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <>
Subject Re: total table rows
Date Thu, 12 Nov 2015 20:15:08 GMT
Ick, that's kind of a pain. We should probably have some kind of utility 
to compute this for you.

You'd likely want to treat the row as a byte[] (instead of thinking in 
terms of characters) and decrement the last byte in the array. We have a 
static method on Range.followingPrefix(Text) which goes the opposite 
way. You could try to take that approach, while we (hopefully) consider 
adding a Range.previousRow(Text) or something.

z11373 wrote:
> Thanks William! This is indeed what I was looking for.
> Text startRow = new Text("k");
> Text endRow = new Text("r");
> ops.deleteRows("myTable", startRow, endRow);
>  From Accumulo book, it said "When you specify start and end rows, the
> deleteRows() method will remove rows that sort after but not including the
> start row, and rows that sort before and including the end row."
> Since it said not including the start row, what is the recommended way to
> get the row before (note the row id can be number or letter)? I wonder why
> it's doesn't include start row, otherwise my job would be easier.
> Thanks,
> Z
> --
> View this message in context:
> Sent from the Developers mailing list archive at

View raw message