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 E833718B6A for ; Thu, 24 Mar 2016 21:58:38 +0000 (UTC) Received: (qmail 71861 invoked by uid 500); 24 Mar 2016 21:58:37 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 71785 invoked by uid 500); 24 Mar 2016 21:58:37 -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 71773 invoked by uid 99); 24 Mar 2016 21:58:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2016 21:58:36 +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 7554A1A4C3D for ; Thu, 24 Mar 2016 21:58:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.129 X-Spam-Level: ** X-Spam-Status: No, score=2.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kIzrvazsUAZ8 for ; Thu, 24 Mar 2016 21:58:34 +0000 (UTC) Received: from mail-yw0-f177.google.com (mail-yw0-f177.google.com [209.85.161.177]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 077C95F479 for ; Thu, 24 Mar 2016 21:58:33 +0000 (UTC) Received: by mail-yw0-f177.google.com with SMTP id g127so77061095ywf.2 for ; Thu, 24 Mar 2016 14:58:33 -0700 (PDT) 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; bh=ToTC9LJJIiXWX/l62B/r2jHaxinf+7bogdpYbR936nY=; b=AA9Iq9XdYxEsONG7ZNGKujMNUbheeqo+JZIHo+8ci0ApaQ+6gFjDarvowZSzai57re ZYOobN61EdsvtN5mdbh2KugIImNSRVVrR9lpQsSAO4ABxSMuDg9E6TXS+qG66038AJhD AMYXDXLr05ESZKuvq0IP7etiCT/dXG5kWyZ4MXVjaz0efKlgFEq11LpfxmTSyrcDGFr/ WYiv5FufDGnmy/BVTNphG9gyo0nrpa4swMPQ5eQGMQ1bIJMBPnkNAODz5wvRBreKIe7f 6nqtJi+q4CNZt17DiTaT1oyJHToD9ephdz+xd5XA/GiRdkFew1WW8qykH3D7l+SMyjoF MOaw== 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; bh=ToTC9LJJIiXWX/l62B/r2jHaxinf+7bogdpYbR936nY=; b=kQiHc0Eqz4XG2ATVCYo5UW1g4n/s7fcg8m1WqZVYnpUUZCFXxh4TQqcTZp3Uz3aGNs +TTpuhIQURFyJBQSvI/yhSmhBItKXJilD1l8LtJo5iLewyQBsf4I8QNOdOPcIvlVkRFQ /8RXrDNCwOcdWLlsBvNRVMYsnnfKwt02Phi37V9tas6n+NwZoi9M8D/k3q9WqZjut4mA j75WKFvQAhcmWTTu3CANhi8os/B6vc3RnhKkHyLvgD92+t6X7uSPEtyvHvCExffN+nO6 bIxAjqpRdlKvxCdaWo5G0Xjk7v7GgHKB+8Kpm21KMRvRzl+M3u9JcQ5mtKnapQAa92KA aDEA== X-Gm-Message-State: AD7BkJILSEy/BrvdzbASlLDEW+rJ3Ub2CksP9uRbF6GX3rg6ZjLdr25vP8rIkygjv8gqDGkQmpBXpuRkEzrLFA== MIME-Version: 1.0 X-Received: by 10.37.78.70 with SMTP id c67mr6082905ybb.1.1458856713147; Thu, 24 Mar 2016 14:58:33 -0700 (PDT) Received: by 10.37.208.4 with HTTP; Thu, 24 Mar 2016 14:58:33 -0700 (PDT) In-Reply-To: References: <56BBD435-BE7D-4F04-A8AA-218881BEEF07@gmail.com> Date: Thu, 24 Mar 2016 14:58:33 -0700 Message-ID: Subject: Re: Unexpected region splits From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a113e83942a5b0f052ed28c81 --001a113e83942a5b0f052ed28c81 Content-Type: text/plain; charset=UTF-8 Actually there may be a simpler solution: http://pastebin.com/3KJ7Vxnc We can check the ratio between online regions and total number of regions in IncreasingToUpperBoundRegionSplitPolicy#shouldSplit(). Only when the ratio gets over certain threshold, should splitting start. FYI On Thu, Mar 24, 2016 at 12:39 PM, Ted Yu wrote: > Currently IncreasingToUpperBoundRegionSplitPolicy doesn't detect when the > master initialization finishes. > > There is also some missing piece where region server notifies the > completion of cluster initialization (by looking at RegionServerObserver). > > Cheers > > On Thu, Mar 24, 2016 at 3:50 AM, Bram Desoete wrote: > >> >> >> >> Pedro Gandola writes: >> >> > >> > Hi Ted, >> > >> > Thanks, >> > I think I got the problem, I'm using >> *IncreasingToUpperBoundRegionSplitPolicy >> > (default)* instead *ConstantSizeRegionSplitPolicy* which in my use case >> is >> > what I want. >> > >> > Cheers >> > Pedro >> > >> > On Mon, Feb 15, 2016 at 5:22 PM, Ted Yu wrote: >> > >> > > Can you pastebin region server log snippet around the time when the >> split >> > > happened ? >> > > >> > > Was the split on data table or index table ? >> > > >> > > Thanks >> > > >> > > > On Feb 15, 2016, at 10:22 AM, Pedro Gandola >> > > wrote: >> > > > >> > > > Hi, >> > > > >> > > > I have a cluster using *HBase 1.1.2* where I have a table and a >> local >> > > index >> > > > (using *Apache Phoenix 4.6*) in total both tables have *300 regions* >> > > > (aprox: *18 regions per server*), my* >> hbase.hregion.max.filesize=30GB >> > > *and >> > > > my region sizes are now *~4.5GB compressed (~7GB uncompressed)*. >> However >> > > > each time I restart a RS sometimes a region gets split. This is >> > > unexpected >> > > > because my key space is uniform (using MD5) and if the problem was >> my >> > > > *region.size >> > > >> * *hbase.hregion.max.filesize *I would expect to have all the >> regions or >> > > > almost all splitting but this only happens when I restart a RS and >> it >> > > > happens only for 1 or 2 regions. >> > > > >> > > > What are the different scenarios where a region can split? >> > > > >> > > > What are the right steps to restart a region server in order to >> avoid >> > > these >> > > > unexpected splits? >> > > > >> > > > Thank you, >> > > > Cheers >> > > > Pedro >> > > >> > >> >> >> >> Thanks Pedro for giving your solution. >> >> i see the same issue during Hbase restarts. unexpected region splits. >> i believe it is because the *IncreasingToUpperBoundRegionSplitPolicy* is >> basing >> his calculation on the amount of ONLINE regions. >> but while the RS is starting only a couple of regions are online YET. >> so the policy things it would be no problem to add another region >> since 'there are only a few'. >> (while there are actually already are 330 for that RS for that phoenix >> table... >> yes i know i need to merge regions. >> but this problem got out of hand unnoticed for some time now here) >> >> could HBase block split region decision until it is fully up and running? >> >> Hbase 1.0.0 logs. (check mainly the last line) >> >> Mar 24, 11:06:41.494 AM INFO >> org.apache.hadoop.hbase.regionserver.DefaultStoreFlusher >> Flushed, sequenceid=69436099, memsize=303.3 K, hasBloomFilter=true, into >> tmp >> file >> >> hdfs://ns/hbase/data/default/CUSTOMER/60af2857a7980ce4f1ac602dd83e05a6/.tmp/ >> 0fd4988f24f24d5d9887c542182efccc >> Mar 24, 11:06:41.529 AM INFO >> org.apache.hadoop.hbase.regionserver.HStore >> Added hdfs://-ns/hbase/data/default/CUSTOMER/ >> ff4ecd56e6b06f228404f05f171f8282/0/1d05cf9cac4c46008e47e3578e7a18d6, >> entries=235, sequenceid=22828972, filesize=5.5 K >> Mar 24, 11:06:41.561 AM INFO >> org.apache.hadoop.hbase.regionserver.HStore >> Completed compaction of 3 (all) file(s) in s of CUSTOMER,\x0A0+\xF6\ >> xD8,1457121856469.183f6134683e0213ccb15558a56f7c02. >> into 730489295b8c42afaec4a3b8bc38c915(size=1.4 M), >> total size for store is 1.4 M. This selection was in queue for >> 0sec, and took 0sec to execute. >> Mar 24, 11:06:41.561 AM INFO >> org.apache.hadoop.hbase.regionserver.CompactSplitThread >> Completed compaction: Request = regionName=CUSTOMER, >> \x0A0+\xF6\xD8,1457121856469.183f6134683e0213ccb15558a56f7c02., >> storeName=s, fileCount=3, fileSize=1.7 M, priority=7, >> time=1456532583179472; >> duration=0sec >> Mar 24, 11:06:41.562 AM DEBUG >> >> org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy >> ShouldSplit because IB size=3269370636, sizeToCheck=2147483648, >> regionsWithCommonTable=2 >> >> i will also revert back to the ConstantSizeRegionSplitPolicy >> >> Regards, >> >> >> >> > --001a113e83942a5b0f052ed28c81--