accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Turner <ke...@deenlo.com>
Subject Re: org.apache.accumulo.core.iterators.Combiner: key scope?
Date Thu, 15 Mar 2012 12:44:29 GMT
On Thu, Mar 15, 2012 at 7:33 AM, Jason Trost <jason.trost@gmail.com> wrote:
> I found myself needing a combiner that will sum the values of a row
> where each key has the same row and column family (but col qual
> differs).
>
> I was looking through the Combiner class and I was wondering if there
> would be any issues with making this line of the code configurable.
> (line 70 in org.apache.accumulo.core.iterators.Combiner)
>
> private boolean _hasNext() {
>      return source.hasTop() && !source.getTopKey().isDeleted() &&
> topKey.equals(source.getTopKey(),
> PartialKey.ROW_COLFAM_COLQUAL_COLVIS);
>    }
>
> Specifically I was thinking it would be useful to be able to configure
> the partial key field using one of the following values (from
> org.apache.accumulo.core.data.PartialKey):
>    ROW
>    ROW_COLFAM
>    ROW_COLFAM_COLQUAL
>    ROW_COLFAM_COLQUAL_COLVIS
>
> I see the main value here in using Combiners at scan time to perform
> various rollups and counts.
>
> I am guessing there may be some security implications of doing this?
> Maybe the labels of aggregations based on any partial key not
> including colvis would need to be combined.
>
> Thoughts on this?
>
> Thanks,
>
> --Jason

Yes, security is a concern.  A user wrote something like what you
mentioned.  They combined col vis by taking the unique set of col vis
expressions and joining them with & and putting parens around them.
This was only intended to be used at scan time and not compaction
time.

Keith

Mime
View raw message