Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # user >> Reverse timestamp order?


Copy link to this message
-
Re: Reverse timestamp order?
Mike,

There is no built in way to do this. If you are replaying history more often than you are grabbing the latest version, you may consider time-stamping the keys yourself with MAX_LONG - current system time in your ingest client.

If you want to grab the whole list and resort, the WholeRowIterator makes it easy to grab a whole rows worth of data at once, assuming your rows fit in memory.

Sent from my iPad

On Feb 15, 2013, at 6:05 PM, Mike Hugo <[EMAIL PROTECTED]> wrote:

> When iterating over multiple versions of the same key, is there a way to receive them in chronological order rather than last inserted first?
>
> For example, if I insert
>
> aKey cf1 cq1 10 aValue1
> aKey cf1 cq1 20 aValue2
> aKey cf1 cq1 30 aValue3
>
> When scanning I receive them in reverse timestamp order - which is great for retrieving the most recent version
>
> aKey cf1 cq1 30 aValue3
> aKey cf1 cq1 20 aValue2
> aKey cf1 cq1 10 aValue1
>
> If I'd like to "replay" history, should I basically grab the whole list and then invert it, or is there a built in way to do this?
>
> Thanks!
>
> Mike
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB