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 EC5C91809E for ; Wed, 20 Jan 2016 06:01:29 +0000 (UTC) Received: (qmail 62943 invoked by uid 500); 20 Jan 2016 06:01:28 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 62866 invoked by uid 500); 20 Jan 2016 06:01:28 -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 62850 invoked by uid 99); 20 Jan 2016 06:01:28 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jan 2016 06:01:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A1F291A0A7A for ; Wed, 20 Jan 2016 06:01:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lIUF526gIor9 for ; Wed, 20 Jan 2016 06:01:26 +0000 (UTC) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 83EA020BFB for ; Wed, 20 Jan 2016 06:01:25 +0000 (UTC) Received: by mail-yk0-f181.google.com with SMTP id v14so581854739ykd.3 for ; Tue, 19 Jan 2016 22:01:25 -0800 (PST) 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 :content-type; bh=QdyYYexRSS2P/O9hIRdAONwEPh2viEX2PdKAihuqoH8=; b=Vt4ikR7fTDeB5t6gRcKkuedzndM2XzsHyxQZjTHEMob/+mF7YGYoeKdxgtgfg9iz4i 9Jr1rTlFFAvKtLnvJi63OjBNZNHT8crUQ4bLxfrq7AyozMgcz5oizLnIRdtL56wRPQWU cyauq2c9806puzDnP6cSea1/J6Jjj2QPk143cITWwW+V19I2txU4SxTnWL86kQofZzTE 0TrI5Ia1sdFmlnUyuqvMnoNMKufb85YSSzIHP7LBrmp0SXw0dG8RlsEW4nZsog/XZXBA 4Jm5Jf5fv7RieXfv97IQVJz7UhzUY+wEqGQKNlv5OKL+7+xE8+qvR01CCJqulW4aQMId Rw/Q== 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:content-type; bh=QdyYYexRSS2P/O9hIRdAONwEPh2viEX2PdKAihuqoH8=; b=JffbPuquvulC3WCXvf5kQHFZaNNPGFxu0bXbZT4PT0g6SIIZLm80JtMKuMuS8uWhb1 WAh8gGPRxN1b1idyb/fijmBc3xQs4LENUdrQcWKuEA4t3okGwZHY1hCFawdTNo4s3eE5 PdzKPZD19Wb+c9gsY5o9f6TeO42zJr9bwDw1AdARIKtWZ4zhI/yEytrdDd9SAi6YiJwU 8vQGCdL7Z+Nei+5yeu66iAtpc43z54UAHXEJR3M7P5x6QWcKeZy+AR02j1KSFDRthdxj NEBa2aOOL1fd/ABl3U0Y9HQHEGHPmn4HsW+GqcK58Yfj7YETRFFjsRuie1IlZ9/eF+OS 6Fjw== X-Gm-Message-State: ALoCoQlmyxK3tjAkGRAddP2aXPWxhQylp9VzViyHYFZv8cBy70sLrAnaYAVXLK/XaMVfScUhKuqUTLEk1nv0l/S31bZHusRJpw== X-Received: by 10.129.57.69 with SMTP id g66mr19810080ywa.176.1453269684448; Tue, 19 Jan 2016 22:01:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.92.196 with HTTP; Tue, 19 Jan 2016 22:00:54 -0800 (PST) In-Reply-To: References: From: Gokul Balakrishnan Date: Wed, 20 Jan 2016 11:30:54 +0530 Message-ID: Subject: Re: Iteration in ResultScanner To: user Content-Type: multipart/alternative; boundary=001a114c85ac4df4d00529bdb79b --001a114c85ac4df4d00529bdb79b Content-Type: text/plain; charset=UTF-8 There are various ways, one of which is as follows: Result result = table.get(new Get("id100".**getBytes())); Cell dataCell = result.getColumnLatestCell("some_column_family","some_qualifier"); byte[] data = CellUtil.cloneValue(dataCell); The byte array "data" will represent the value of the column you've retrieved. Note that this code returns the latest version of the cell you've specified, and you'll have to do the necessary null checks for "dataCell". On 20 January 2016 at 11:09, Rajeshkumar J wrote: > Hi solomon, > > The statement you have given is of org.apache.hadoop.hbase.client.Result > type. How to get all the column values from this?? > > Thanks > > On Tue, Jan 19, 2016 at 6:45 PM, Solomon Duskis wrote: > > > It sounds like you want a Get rathe than a scan. *table.get(new > > Get("id100".**getBytes()));* should do the trick. > > > > On Tue, Jan 19, 2016 at 7:17 AM, Rajeshkumar J < > > rajeshkumarit8292@gmail.com> > > wrote: > > > > > Hi, > > > > > > I have implemented Range scan using Java API as shown below > > > > > > Scan scan = new Scan(); > > > Configuration config = HBaseConfiguration.create(); > > > HTable table = new HTable(config, "tablename"); > > > scan.setStartRow("id100".getBytes()); > > > scan.setStopRow("id100".getBytes()); > > > ResultScanner scanner = table.getScanner(scan); > > > > > > Is there any option like so that i can get all the column values only > > for a > > > particular row-key without iteration. > > > > > > For ex : I have used id100 which is a row-key. After the scan completed > > how > > > to get all the column values of id100 row key without iteration. > > > > > > Thanks, > > > Rajeshkumar J > > > > > > --001a114c85ac4df4d00529bdb79b--