Accumulo, mail # user - Re: scan iterator that rolls up col vis - 2014-07-02, 15:28
Solr & Elasticsearch trainings in New York & San Francisco [more info][hide]
 Search Hadoop and all its subprojects:

Switch to Threaded View
Copy link to this message
-
Re: scan iterator that rolls up col vis
you should be able to roll up on keys with a condition similar to:

if( source.hasTop() ) {
  Key start = new Key(source.getTopKey()); // avoid instance-reuse issues
  long count = 0;
  while( source.hasTop() && start.equals( source.getTopKey(),
PartialKey.ROW_COLFAM_COLQUAL_COLVIS ) {
    count += deserialize(source.getTopValue());
    source.next();
  }
  Value new_top_value = serialize(count);
  // start can represent the top key of the iterator
}

We can flesh this out further if you run into issues. I think that we may
need to set the start key's timestamp to 0 so that it sorts after all the
other cells with a similar prefix.
On Tue, Jul 1, 2014 at 10:41 PM, Matthew Purdy <
[EMAIL PROTECTED]> wrote:
 
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