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 06998200B70 for ; Sat, 27 Aug 2016 21:58:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0507E160AB0; Sat, 27 Aug 2016 19:58:09 +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 2452F160A93 for ; Sat, 27 Aug 2016 21:58:07 +0200 (CEST) Received: (qmail 12449 invoked by uid 500); 27 Aug 2016 19:58:06 -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 12437 invoked by uid 99); 27 Aug 2016 19:58:06 -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; Sat, 27 Aug 2016 19:58:06 +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 E169DC1324 for ; Sat, 27 Aug 2016 19:58:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.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 V2nl9Gku401T for ; Sat, 27 Aug 2016 19:58:04 +0000 (UTC) Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 359AA5FC55 for ; Sat, 27 Aug 2016 19:58:04 +0000 (UTC) Received: by mail-ua0-f174.google.com with SMTP id m60so149243443uam.3 for ; Sat, 27 Aug 2016 12:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=9kuwk1JUZVbM911XotlKlHLoxwOcv3ZgNKP95U6QFks=; b=01yRPPy0ZSh27a6+g88R2BN5RciBgYT+CmHtAfG7t5IHUY3pgS5X8NjUs0QGMepkb/ v/ZFDDX3V8fjjc64Ge5r2OrR7RHw+9MYf4+uHb8tByGrCvo8zZJuz3jclij9e1dThB8j Z5jpWJFc2UnKpxO6Q674f2wngNv5UGxS+Y0b6+gB0BYRgYJZ2Pu6fYnssS6VPdo1prBy NgidfAfmJdQDEA5MRMLbNt0wVI3Pip2JKGCtz4bPPpUausnUxCyaH5RzpfSrNiTZzXSL aEwmSebtfUUJr/nCAQQZv44+60PrUbpdAAf5/JeksSe5QUFVieNYvc2PDIjUnAGId5hZ bGSg== 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=9kuwk1JUZVbM911XotlKlHLoxwOcv3ZgNKP95U6QFks=; b=YMWVlhbYHJVssX4FE3eIAMGTR7hrlJ4DgUGTJKpRLvf7VNYkcnhcurDPkVQTsjT5RJ r6WYFmp3bCKE+22C6IBId53ReDmxX/VbthIxmeMV1BglelOGPbhbX2lXiFDxPGq8d6co evViaSqEuUhTTAcv5ieyfz5UzGtMN5J9x7Cg+QYpq98nLLNYqwk8FIo3HYff/7pICbjt F8MyIeSS+tKCUW2Yf8JvCZ2LX+o9YVOBjYBarlkrVIevSA6YGmuUGGn/j9WNYrGBXFH8 jVM+gS9g73+4++cK5qENT9DK2twiY1zo3DLYzaWxUrUE1IJTyKte9omCqQL8VkOSD6EG XaDg== X-Gm-Message-State: AE9vXwMrnsM7i83q0nYx07+dw76YxCP89jtZIeAQoBmoYh4a3CL+Ww5WPmdhjlyaH0+coEZGpRrOf1shTbKr/tq/ X-Received: by 10.31.79.66 with SMTP id d63mr6007452vkb.96.1472327877887; Sat, 27 Aug 2016 12:57:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.80.8 with HTTP; Sat, 27 Aug 2016 12:57:17 -0700 (PDT) In-Reply-To: References: From: Dima Spivak Date: Sat, 27 Aug 2016 12:57:17 -0700 Message-ID: Subject: Re: Hbase Heap Size problem and Native API response is slow To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a114dd64027a918053b130cb9 archived-at: Sat, 27 Aug 2016 19:58:09 -0000 --001a114dd64027a918053b130cb9 Content-Type: text/plain; charset=UTF-8 Can you give us more specifics about what kind of performance you're expecting, Manjeet, and what kind of performance you're actually seeing? Also, how big is your cluster (i.e. number of nodes, amount of RAM/CPU per node)? It's also important realize that performance can be impacted by the write patterns of the data you're trying to query; if compactions haven't occurred at the time that you try to do your reads, HBase may have to go to disk repeatedly to access HFiles, even when only accessing columns within one row. On Sat, Aug 27, 2016 at 11:12 AM, Manjeet Singh wrote: > Thanks Vladrodionov for your reply > I took this design from twiter where a rowkey is twitter id and twites and > hastag in column > > I hv mob no or ip by which domain visited in column qualifyer. > > can you plz tell me how can I index my row key with qualam idk how many > column I hv > On 27 Aug 2016 22:21, "Vladimir Rodionov" wrote: > > > >> Problem is its very slow > > > > rows are not indexed by column qualifier, and you need to scan all of > them. > > I suggest you consider different row-key design or > > add additional index-table for your table. > > > > -Vlad > > > > On Sat, Aug 27, 2016 at 4:12 AM, Manjeet Singh < > manjeet.chandhok@gmail.com > > > > > wrote: > > > > > Hi All, > > > > > > can anybody suggest me the improvement in my below code > > > Purpose os this code to get column qualifier by prefix scan > > > Problem is its very slow > > > > > > > > > public static ArrayList getColumnQualifyerByPrefixScan(String > > > rowKey, String prefix) { > > > > > > ArrayList list = null; > > > try { > > > > > > FilterList filterList = new FilterList(FilterList. > > Operator.MUST_PASS_ALL); > > > Filter filterB = new QualifierFilter(CompareFilter.CompareOp.EQUAL, > > > new BinaryPrefixComparator(Bytes.toBytes(prefix))); > > > filterList.addFilter(filterB); > > > > > > list = new ArrayList(); > > > > > > Get get1 = new Get(rowKey.getBytes()); > > > get1.setFilter(filterList); > > > Result rs1 = hTable.get(get1); > > > int i = 0; > > > for (KeyValue kv : rs1.raw()) { > > > list.add(new String(kv.getQualifier()) + " "); > > > } > > > } catch (Exception e) { > > > //System.out.println(e.getMessage()); > > > > > > } > > > return list; > > > } > > > > > > > > > > > > > > > > > > On Fri, Aug 26, 2016 at 7:56 PM, Manjeet Singh < > > manjeet.chandhok@gmail.com > > > > > > > wrote: > > > > > > > Hi All > > > > > > > > I am using wide table approach where I have might have more > 1,00,0000 > > > > column qualifier > > > > > > > > I am getting problem as below > > > > Heap size problem by using scan on shell , as a solution I increase > > java > > > > heap size by using cloudera manager to 4 GB > > > > > > > > > > > > second I have below Native API code It took very long time to process > > can > > > > any one help me on same? > > > > > > > > > > > > > > > > > > > > > > > > public static ArrayList getColumnQualifyerByPrefixScan > (String > > > > rowKey, String prefix) { > > > > > > > > ArrayList list = null; > > > > try { > > > > > > > > FilterList filterList = new FilterList(FilterList. > > > Operator.MUST_PASS_ALL); > > > > Filter filterB = new QualifierFilter(CompareFilter.CompareOp.EQUAL, > > > > new BinaryPrefixComparator(Bytes.toBytes(prefix))); > > > > filterList.addFilter(filterB); > > > > > > > > list = new ArrayList(); > > > > > > > > Get get1 = new Get(rowKey.getBytes()); > > > > get1.setFilter(filterList); > > > > Result rs1 = hTable.get(get1); > > > > int i = 0; > > > > for (KeyValue kv : rs1.raw()) { > > > > list.add(new String(kv.getQualifier()) + " "); > > > > } > > > > } catch (Exception e) { > > > > //System.out.println(e.getMessage()); > > > > > > > > } > > > > return list; > > > > } > > > > > > > > Thanks > > > > Manjeet > > > > -- > > > > luv all > > > > > > > > > > > > > > > > -- > > > luv all > > > > > > -- -Dima --001a114dd64027a918053b130cb9--