Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A7B8B17481 for ; Fri, 22 Jan 2016 05:25:09 +0000 (UTC) Received: (qmail 31679 invoked by uid 500); 22 Jan 2016 05:25:07 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 31604 invoked by uid 500); 22 Jan 2016 05:25:07 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 31590 invoked by uid 99); 22 Jan 2016 05:25:07 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2016 05:25:07 +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 11B24C00F8 for ; Fri, 22 Jan 2016 05:25:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 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=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qamdGL9v9IzA for ; Fri, 22 Jan 2016 05:25:06 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id A43F020CE7 for ; Fri, 22 Jan 2016 05:25:05 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id x4so35512244lbm.0 for ; Thu, 21 Jan 2016 21:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZofPQJcuXwT2OCKwnia84tG6FA00bYJ7UWcKfZC6I+A=; b=XidyMJAyCVzoBxmCOijMn5OlPt1x8CGCdGy17CA9oYeTigJQJWaV0N1fhjudAGHhFn LGglvl1DIWQuUlMGhpwyeFu88yCofEU+I4K1oqhjKt8k/bebcwJTLN49PXEsW8P3J5jN 8qpDQmFoz2COoW/2SStuErzH4dIiMmZbg22/Rixxal0lJ3S5zMq/N2mUVtt1RnUShIjW 5uqzwMvl25uinSwtIjWdNtyoEcBdn5xwPOJ4xZwUuupoJTQ+D0W9H2RjLW7l8yiRUOki mpIsO8YqkQ3HDJaEA/NBGZbXNbXHetXipyroWuobKH7k9lFHZqYQetkUfRdMsMBN/Sel NdmA== 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:date :message-id:subject:from:to:content-type; bh=ZofPQJcuXwT2OCKwnia84tG6FA00bYJ7UWcKfZC6I+A=; b=Y6rEhzv0clrP5loxkeXc2Esh/3m/TK5m7FqS/kPte52DiQdU46qTMISwZ+6SizP6tc QPtoY0TyiCAX8RNSyxXZU1snftNWurNOgvYpMiSWxQxCVpJeS/9+30tbrw+Xy3jFa8y+ W5CgUT1jjqeuoMxkhLkomBFXz5defB6GUzuxZYYgCXvpvy7yftfjL+EZunALmCxxPoJw E2H+cyi9W3QNK8hd0oEhP32V4u3Kb0cgUfgDElPqNISQf9FMAGxqgBIkPZbfLfrn4NY6 2eTyadGH43Aij+CYD/wvY+ZU+kWwr9z3XiK6DS8/LlJWbyaVuyEXaNY8WV/IAyIBc6fN FxKw== X-Gm-Message-State: AG10YOSpc941PsJwCXb8mrq/32TFHQBYdHZluHRysWiTmp/ZAynsqNS6OdvjtfLONz1MH1SM8A6mmK8VnZcquw== MIME-Version: 1.0 X-Received: by 10.112.13.8 with SMTP id d8mr420879lbc.110.1453440304108; Thu, 21 Jan 2016 21:25:04 -0800 (PST) Received: by 10.114.63.197 with HTTP; Thu, 21 Jan 2016 21:25:04 -0800 (PST) In-Reply-To: References: Date: Fri, 22 Jan 2016 10:55:04 +0530 Message-ID: Subject: Re: Getting all the columns of row-key at once From: Rajeshkumar J To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11c3b44e075d7d0529e5719c --001a11c3b44e075d7d0529e5719c Content-Type: text/plain; charset=UTF-8 Hi, For instance Row-key col1 col2 col3 col4 100 xxx yyy zzz aaa I am scanning this row-key(100) and I want to get the value as xxx,yyy,zzz,aaa from Result instance. Not using iterator to get xxxx then yyyy then zzzz then aaaa. Thanks On Fri, Jan 22, 2016 at 10:47 AM, ramkrishna vasudevan < ramkrishna.s.vasudevan@gmail.com> wrote: > Once you retrieve a result it will have all the columns that were scanned. > If suppose you had 5 columns and you specifically wanted only 2 columns out > of it you can add the required columns using scan.addColumn() API then the > result will have only those 2 columns. > If nothing is specified your result will have entire set of columns that > comprises that row (including multiple Column families). > > But every column's result is an individual KeyValue which you may have to > iterate and get it. > >> So is there any option to get all the column > values of row-key at once. > So this is already happening for you. Am I missing something here? > > On Fri, Jan 22, 2016 at 10:31 AM, Rajeshkumar J < > rajeshkumarit8292@gmail.com > > wrote: > > > Hi, > > > > I have already posted this in mailing list but with changes in my use > > case. Is there any options to retrieve all the columns of row-key at > once. > > > > ResultScanner resultScanner = table.getScanner(scan); > > Iterator iterator = resultScanner.iterator(); > > while (iterator.hasNext()) { > > Result next = iterator.next(); > > for (KeyValue key : next.list()) { > > > > System.out.println(Bytes.toString(key.getValue())); > > } > > > > > > > > This is how I am doing scan using java api. Using this I can get only > one > > columns in each iteration. So is there any option to get all the column > > values of row-key at once. > > > > Thanks > > > --001a11c3b44e075d7d0529e5719c--