Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4E240200B8E for ; Mon, 26 Sep 2016 14:42:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 433B4160AC8; Mon, 26 Sep 2016 12:42:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 61DC5160AB8 for ; Mon, 26 Sep 2016 14:42:01 +0200 (CEST) Received: (qmail 51598 invoked by uid 500); 26 Sep 2016 12:42:00 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 51581 invoked by uid 99); 26 Sep 2016 12:42:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 12:42:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C141B1800B9 for ; Mon, 26 Sep 2016 12:41:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Gd55UXmuJ-3p for ; Mon, 26 Sep 2016 12:41:57 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 753535F36A for ; Mon, 26 Sep 2016 12:41:57 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id y6so140329356lff.1 for ; Mon, 26 Sep 2016 05:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=k/wLHlCEwWHEwei0LB32zET0m+UqsgVvKNylL5uQkr8=; b=bn7aGdNLQlyn2kV2uwBPpIkMImC02nWDu6kwjX6865CG//rkJ9o09JVe6tKajqeytd k7bbeknqkpGpvJR0nZZozEIWWlkQv6+7wEtF+AlgQpJASUwHBheszxGvEmgw80qtTCvz qXHV/ZDdPyVOrVCuZQYYRmWlzqtZ7v8IuHo57a0UBSWXsrzj/2cFs8e1bIIWaR4D6n7R 7ydnSPbaF8hd3EpxQWxrF6SlxPgt8rORGG7CaRtCi98aHR+L3yLp3PxI57qOOT2mvBjJ 5DHDtuaNOLEXndDayBcpT5RqFFpD/7TaU2adju5HfqbWpZcAMU1zPGJbT3aDzMcmB7JJ nZyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=k/wLHlCEwWHEwei0LB32zET0m+UqsgVvKNylL5uQkr8=; b=RR451KYIz3yPdXZqX5gElfnR655b/qQPwrmWYyIa8588w8wnEQa2uS5kXfRacVta+g Dz3DMG4QdgF9kNfn6+NaghcRKtdjgfjVdI7zVcSnT84gzpDG8qEYrFaGh9njAFBm2Epm jXek3PepQBI4T0gXl1qqn+jjWa3Rc58mB48+6cAZjG829h00NQtI2/3Ac+N4rOuM23lU 8Rc8QTZdlaz02Fi/t4GO7HS+pUP2fRt+u9Pl8TiNO9xdm91cbABd2Uwv1GS6TzGgV1Zi jRvZJqpTxh/RFPSHuUNQL1MIjjz4/VLTii+sglV2CRzr+ve63lgGePQJ5FOC85mHmX6s zYHw== X-Gm-Message-State: AA6/9RkFCLweZRSn2MhWS2HsQ12SSYT6A9o+hK3Ek+UDh0DFH2pnCrk2C+e19+aViJOEabmJOsU7rZJjeD9y/g== X-Received: by 10.194.145.229 with SMTP id sx5mr17767908wjb.13.1474893709494; Mon, 26 Sep 2016 05:41:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.238.68 with HTTP; Mon, 26 Sep 2016 05:41:08 -0700 (PDT) In-Reply-To: References: From: Yamini Joshi Date: Mon, 26 Sep 2016 07:41:08 -0500 Message-ID: Subject: Re: Accumulo Equivalent of Mongo Aggr Query To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=089e01177127a2d0a8053d6873f4 archived-at: Mon, 26 Sep 2016 12:42:02 -0000 --089e01177127a2d0a8053d6873f4 Content-Type: text/plain; charset=UTF-8 Hi Dylan This is what I'm trying to do: #groupby id and create 2 new columns: np2 and shared query = {'$group': {'_id': '$student_id', 'np2': {'$first': '$count'}, 'shared': {'$sum': 1}}} The statement written above is one of the stages in a mongo aggregate query. The results of allthe stages are computed on the server side and the final result returned to the user. My problem is: I can't figure out 2 things: 1. How to add new columns while writing a Combiner/iterator 2. How to do group by (based on a condition since data in accumulo is always stored in a group). Best regards, Yamini Joshi On Sun, Sep 25, 2016 at 5:18 PM, Dylan Hutchison wrote: > Hi Yamini, > > Could you further describe the computation you have in mind, for those of > us not familiar with MongoDB's "Aggr" function? You may want to look at > Accumulo's built-in Combiner iterators > . They > seem more relevant than Filters. > > I don't know what you mean when you write that your output is not visible > to "the complete Database". > > Regards, Dylan > > On Sun, Sep 25, 2016 at 11:34 AM, Yamini Joshi > wrote: > >> >> Hello everyone >> >> I wanted to know if there is any equivalent of Mongo Aggr queries in >> Acuumulo. I have a complex query in form of a Mongo aggregate >> (multi-staged) query. I'm trying to model the same in Accumulo. As of know, >> with the limited knowledge that I have, I have created a class extending >> Filter class. My question is: since my queries depend on a input, is there >> any other way of using the iterators/filters only for one query or change >> their input with every single query? As of now, my filter is getting >> attached to the table on 'SCAN' that means the output will be visible to >> the subsequent queries and not the complete Database. >> >> Best regards, >> Yamini Joshi >> >> > --089e01177127a2d0a8053d6873f4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dylan

This is wha= t I'm trying to do:
#groupby id and create 2 new columns: np2 and sh= ared
=C2=A0query =3D {'$group': {'_id': '$student_id= ', 'np2': {'$first': '$count'}, 'shared'= ;: {'$sum': 1}}}

The statement written above is one of= the stages in a mongo aggregate query. The results of allthe stages are co= mputed on the server side and the final result returned to the user.
My problem is: I can't figure out 2 things:
1. How to a= dd new columns while writing a Combiner/iterator
2. How to do grou= p by (based on a condition since data in accumulo is always stored in a gro= up).


Best regards,
Yamini Joshi

On Sun, Sep 25, 2016 at 5:18 PM, Dylan Hutch= ison <dhutchis@cs.washington.edu> wrote:
Hi Yamini,

Coul= d you further describe the computation you have in mind, for those of us no= t familiar with MongoDB's "Aggr" function?=C2=A0 You may want= to look at Accumulo's built-in Combiner iterators.=C2=A0 They seem more relevant than Filters. =C2=A0

=
I don't know what you mean when you write that your output is not = visible to "the complete Database".

Rega= rds, Dylan

On Sun, Sep 25, 2016 at 11:34 = AM, Yamini Joshi <yamini.1691@gmail.com> wrote:

<= div dir=3D"ltr">
Hello everyone

I wanted to know if there = is any equivalent of Mongo Aggr queries in Acuumulo.=20 =20 =20 =20 =20 =20 =20 =20 I have a complex query in=20 form of a Mongo aggregate (multi-staged) query. I'm trying to model the= =20 same in Accumulo. As of know, with the limited knowledge that I have, I=20 have created a class extending Filter class. My question is: since my=20 queries depend on a input, is there any other way of using the=20 iterators/filters only for one query or change their input with every=20 single query? As of now, my filter is getting attached to the table on=20 'SCAN' that means the output will be visible to the subsequent quer= ies=20 and not the complete Database.

=
Best regards,
Yamini Joshi



--089e01177127a2d0a8053d6873f4--