-Re: Can Sort Order Be Reversed?
Adam Fuchs 2012-05-31, 14:40
Nope, we currently only support one sort order. The closest you can come is
by using an encoding the flips the sort order. In this case, you would take
every byte and subtract it from 255 to get your new row, so:
void convert(byte row)
for(int i = 0; i < row.length; i++)
row[i] = (byte)(255 - row[i]);
byte row = "abcd".getBytes();
// convert to backwards sort
Mutation m = new Mutation(row);
BatchWriter bw = ...
Scanner s = ...
byte  row = e.getKey().getRow();
// convert back
On Thu, May 31, 2012 at 10:25 AM, David Medinets
> I don't know why it has taken me so long to ask this basic question.
> Rows are stored in Accumulo in sorted order - high to low. Is there a
> configuration option to flip the sort? My specific use case has dates
> as the record key and I want to see the oldest records first.