From user-return-1631-archive-asf-public=cust-asf.ponee.io@kudu.apache.org Fri Mar 22 19:13:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1FC0818064D for ; Fri, 22 Mar 2019 20:13:20 +0100 (CET) Received: (qmail 60575 invoked by uid 500); 22 Mar 2019 19:13:20 -0000 Mailing-List: contact user-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@kudu.apache.org Delivered-To: mailing list user@kudu.apache.org Received: (qmail 60565 invoked by uid 99); 22 Mar 2019 19:13:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2019 19:13:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 31FA9C0473 for ; Fri, 22 Mar 2019 19:13:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.1 X-Spam-Level: * X-Spam-Status: No, score=1.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=boristyukin.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id oZnz1LVxgNgC for ; Fri, 22 Mar 2019 19:13:17 +0000 (UTC) Received: from mx26-out30.antispamcloud.com (mx26-out30.antispamcloud.com [148.251.71.30]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 967CB624BA for ; Fri, 22 Mar 2019 19:13:16 +0000 (UTC) Received: from s2.fcomet.com ([99.198.101.250]) by mx114.antispamcloud.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1h7PbG-000qUF-HK for user@kudu.apache.org; Fri, 22 Mar 2019 20:13:09 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=boristyukin.com; s=default; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1eFWwQ8t68K7RliqqCqUkN9xtKpLONO+J+e0BetrDq8=; b=i5xODkL5aeHq/YUhuSWdBJMLW sziolcfGfSY9xv7+ISW9P/u97xNzV3kAZNbDM22sA6ot3a07tVbpF9AkO+BAONDKzOInk7PcMWwM1 rS+k6kmvKBDXS36tlHHqK0WQvAgWETuC8sFA0DZkXIhmX9k7MkqZPTGobPhraa/lIlBsU=; Received: from mail-io1-f51.google.com ([209.85.166.51]:38550) by s2.fcomet.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1h7Paa-007Edv-6i for user@kudu.apache.org; Fri, 22 Mar 2019 14:12:24 -0500 Received: by mail-io1-f51.google.com with SMTP id v4so2614926ioj.5 for ; Fri, 22 Mar 2019 12:12:24 -0700 (PDT) X-Gm-Message-State: APjAAAW2x7bdKPxjBlbAdo26J6XRs2WfTOPp/WH2p9lbdhy2ZWtm0aMa JRQHDNlrVMmrbhrPdWwA6FS4yoXatKX3haz6EPk= X-Google-Smtp-Source: APXvYqySXmVib3HaHX1v5TjJjomXQhJrwIEgbc1WYdblQeioCAh4pOUZG67Pt0Y1Z2MZrIv6IpXARmnbypZJW177vkw= X-Received: by 2002:a6b:5c0a:: with SMTP id z10mr7295603ioh.138.1553281944208; Fri, 22 Mar 2019 12:12:24 -0700 (PDT) MIME-Version: 1.0 References: <1553250180.292471464@f530.i.mail.ru> In-Reply-To: From: Boris Tyukin Date: Fri, 22 Mar 2019 15:11:48 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Kudu table api To: user@kudu.apache.org Content-Type: multipart/alternative; boundary="000000000000854e650584b3a233" X-AuthUser: boris@boristyukin.com X-Originating-IP: 99.198.101.250 X-Spampanel-Domain: s2.fcomet.com X-Spampanel-Username: 99.198.101.250 Authentication-Results: antispamcloud.com; auth=pass smtp.auth=99.198.101.250@s2.fcomet.com X-Spampanel-Outgoing-Class: unsure X-Spampanel-Outgoing-Evidence: Combined (0.23) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5lUuzhoEaC5nLh1j937jHAt602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO2HFEYQDlNqPthodLGs7Ym7sT+bYMn6GaM87VISxooGyT9H2PaX0JuBfaV5sqGAEbVpr jQPFk8m4tSTfORUp3ynEm+h0A2koB3qKN5bbUQlCA6/f1y/ezRoz5LzSoT+Zg5FVgpT1b21uZVck Gp0ccOYNj3IsPxUoOvqBoVWc32LibjGdSRNeAsqwADJIlioxB+Ri1Gwjhmdwj/RC7BTJQIETmEFB zGJ4I3iI+cUBLpxHZqMsFXHkY4b0tMjYHlbEsQ6yCIj+j+sW7DnHSTh9wIB9qzbFFetd0V4Svjqc FPolF8VpymDAm51vSeaku+X2qYfWdHzoB2yW92yX6zvRr8G3oEylfy4A99tD8GFqkKlsRifKj6hE Hw0IN9lKU5ja14/ynBiLuEnibWyXa+P6Iz/FFqY55gMEjAGvEhbP5bx6KTjECb0PwpN4olPuA0AI 94UgbmtWBJmoqp7PO0jTMckGPdEgDPANQdzlUKVhhu6yFGFhQRYDHHDaUsWCDlSU6ypnPaEcfhar u93YipWZoazL3+78quB88vMMwpjAPlFKy2+j1Cq1Ez+b4Kspst6f8E8xM8Y4eBPc3eGsLSyezc/C jPcAYYdrjTo0UzL7tgUcA3i6p6NX/LKKHrFv+48kGiJmnmrek/kmxOkyEiNbCeLiXTupLYWDIpbD zHTsVO4ker8iJLyjlwNpr9u3i1oi3iKpB2avGV0O7KE00aSmDKRWqdNgnkrwfNhj19kR9AmMw6nI oDr0sXUZ7YZoZ/GZ+os12d8DksgHMJrED3AEl4+1JikDOU2A/cR49PJVjtl6NpDwIkCsgKniK985 9EBZ1lYFvf25LVONYbYifH5OzZBzjWImDnab5VMmjhUumJ4xCQaGrI2jEvH/q0rd16SMUb3HuWyy y5n/new5uG7Rgk0= X-Report-Abuse-To: spam@quarantine10.antispamcloud.com --000000000000854e650584b3a233 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dmitry, check Java Kudu API examples if you have not done it yet https://github.com/apache/kudu/tree/master/examples I remember it had a helper class that counts rows. Like Adar said, I do not think there is a better / faster way - you just create a Kudu scanner, get rows back and iterate over returned sets and increase the counter. It was much faster than Impala count in my benchmarks - Kudu API is extremely fast and easy to use. Boris On Fri, Mar 22, 2019 at 2:22 PM Adar Lieber-Dembo wrote= : > Probably a scan with no predicates and a minimal projection. Then you > can iterate over the results and increment a count of rows. > > Or, if you're using Impala, "SELECT COUNT(*) FROM FOO". > > On Fri, Mar 22, 2019 at 3:23 AM =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0= =B9 =D0=9F=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2 wrote: > > > > Hi guys > > > > What is the quickest way to get total number of rows in the table using > kudu client? > > > > Regards, Dmitry Pavlov > --000000000000854e650584b3a233 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dmitry, check Java Kudu API examples i= f you have not done it yet

I remember it had a helper class that counts = rows. Like Adar said, I do not think there is a better / faster way - you j= ust create a Kudu scanner, get rows back and iterate over returned sets and= increase the counter.=C2=A0

It was much faster th= an Impala count in my benchmarks - Kudu API is extremely fast and easy to u= se.

Boris

On Fri, Mar 22, 2019 at 2:22 = PM Adar Lieber-Dembo <adar@cloudera= .com> wrote:
Probably a scan with no predicates and a minimal projection. Then you can iterate over the results and increment a count of rows.

Or, if you're using Impala, "SELECT COUNT(*) FROM FOO".

On Fri, Mar 22, 2019 at 3:23 AM =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 = =D0=9F=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2 <dm.pavlov@inbox.ru> wrote:
>
> Hi guys
>
> What is the quickest way to get total number of rows in the table usin= g kudu client?
>
> Regards, Dmitry Pavlov
--000000000000854e650584b3a233--