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 9F1EE18636 for ; Thu, 8 Oct 2015 14:53:19 +0000 (UTC) Received: (qmail 25421 invoked by uid 500); 8 Oct 2015 14:53:14 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 25354 invoked by uid 500); 8 Oct 2015 14:53:14 -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 25342 invoked by uid 99); 8 Oct 2015 14:53:14 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2015 14:53:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2F2A8180E3E for ; Thu, 8 Oct 2015 14:53:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 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, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xueeDNd4xAFE for ; Thu, 8 Oct 2015 14:53:11 +0000 (UTC) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 47088203BC for ; Thu, 8 Oct 2015 14:53:11 +0000 (UTC) Received: by ykba192 with SMTP id a192so46960577ykb.3 for ; Thu, 08 Oct 2015 07:53:10 -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 :content-type; bh=A7hV5OP5m+CGYfzarBVLSToSipXtCDdEIIAEiWPP2qI=; b=dXTsxHcXib47cRQ6Dxzn4Z/Bf5KZthL0+yzCQ2Xcggktyqx2KnHwaE9T1+qSzq/HZx +1IEplsgT5pIZ3NZQqF5FyjZoI7Fz7VenhTG7zGEvA+aW2b6IXRjboZu+iXys5YNI84M gApL/r+W31gZ3fMFMmq/Y968q/uNYXwUSWGdnvIUShBtdxm7AQI5Xy9sMLHjqMJ35RSz XXDxsNuXoa3yi0uUhQKz5ciu6ACm6QPMnJ1hyvAEQQSAoZgoWFPVn5uQJXS4PJQpgD6a r3YhZ5WYYHraMpaARx7FSweLi5gnRqAVl9FSeNPYUeGs1du6XNgBLPGLVPpFkE0uvyW2 pudA== MIME-Version: 1.0 X-Received: by 10.13.236.208 with SMTP id v199mr5600222ywe.20.1444315990427; Thu, 08 Oct 2015 07:53:10 -0700 (PDT) Received: by 10.37.210.197 with HTTP; Thu, 8 Oct 2015 07:53:10 -0700 (PDT) In-Reply-To: <618990CD-522E-42DF-8625-687FC6DA7324@connexity.com> References: <57258DD8-8440-4F2A-9D51-C1ADC28ED7A9@connexity.com> <9680FF4F-6AA1-4016-8707-489CE209AC3E@connexity.com> <618990CD-522E-42DF-8625-687FC6DA7324@connexity.com> Date: Thu, 8 Oct 2015 07:53:10 -0700 Message-ID: Subject: Re: Minor compacts seem blocked on major compacts From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=94eb2c0870dc8d93ac05219905ba --94eb2c0870dc8d93ac05219905ba Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable See the following: http://hbase.apache.org/book.html#build If you continue to have problem building hbase, I suggest starting another thread on user@ with errors encountered. Cheers On Thu, Oct 8, 2015 at 7:49 AM, Randy Fox wrote: > Thanks Ted, looks the right change. We are using CDH and it does not hav= e > that fix. Easy enough to put in, though I tried to build hbase and ran > into many issues. > Is there a doc somewhere on the prereqs for building hbase (1.0.0) in > particular and the mvn flags? > > Thanks, > > Randy > > > > On 10/7/15, 1:34 PM, "Ted Yu" wrote: > > >Have you seen the following code ? > > > > ThreadPoolExecutor pool =3D (selectNow && > >s.throttleCompaction(compaction.getRequest().getSize())) > > ? longCompactions : shortCompactions; > > > >Looks like throttleCompaction() returned false. > >Please see the following method in RatioBasedCompactionPolicy : > > > > public boolean throttleCompaction(long compactionSize) { > > > > return compactionSize > comConf.getThrottlePoint(); > > > >FYI > > > >On Wed, Oct 7, 2015 at 11:07 AM, Randy Fox wrote: > > > >> Looking at the source I don=E2=80=99t see how a manual major compact c= ould get > in > >> the large compaction pool: > >> If selectNow Is True the pool selector has to be shortCompactions. Fr= om > >> the logs it sure seems that selectNow has to be true, else it would ha= ve > >> logged =E2=80=9Csystem=E2=80=9D instead of > >> > "org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactio= nContext@7f236eb8 > >> ;=E2=80=9D > >> > >> > >> Sure seems like an hbase bug. > >> > >> Am I missing something? > >> > >> Thanks, > >> > >> Randy > >> > >> /** > >> * @param r HRegion store belongs to > >> * @param s Store to request compaction on > >> * @param why Why compaction requested -- used in debug messages > >> * @param priority override the default priority (NO_PRIORITY =3D=3D > decide) > >> * @param request custom compaction request. Can be null in > >> which case a simple > >> * compaction will be used. > >> */ > >> private synchronized CompactionRequest requestCompactionInternal(fin= al > >> HRegion r, final Store s, > >> final String why, int priority, CompactionRequest request, boole= an > >> selectNow) > >> throws IOException { > >> if (this.server.isStopped() > >> || (r.getTableDesc() !=3D null && > >> !r.getTableDesc().isCompactionEnabled())) { > >> return null; > >> } > >> > >> CompactionContext compaction =3D null; > >> if (selectNow) { > >> compaction =3D selectCompaction(r, s, priority, request); > >> if (compaction =3D=3D null) return null; // message logged insid= e > >> } > >> > >> // We assume that most compactions are small. So, put system > >> compactions into small > >> // pool; we will do selection there, and move to large pool if > >> necessary. > >> long size =3D selectNow ? compaction.getRequest().getSize() : 0; > >> ThreadPoolExecutor pool =3D (!selectNow && s.throttleCompaction(si= ze)) > >> ? longCompactions : shortCompactions; > >> pool.execute(new CompactionRunner(s, r, compaction, pool)); > >> if (LOG.isDebugEnabled()) { > >> String type =3D (pool =3D=3D shortCompactions) ? "Small " : "Lar= ge "; > >> LOG.debug(type + "Compaction requested: " + (selectNow ? > >> compaction.toString() : "system") > >> + (why !=3D null && !why.isEmpty() ? "; Because: " + why : "= ") + > >> "; " + this); > >> } > >> return selectNow ? compaction.getRequest() : null; > >> } > >> > >> > >> > >> > >> > >> On 10/6/15, 9:58 PM, "Randy Fox" wrote: > >> > >> >Sorry, I do not follow. I thought there was one thread per pool, one > for > >> large and one for small. Thus my major compact should have been in th= e > >> large pool and not blocking the small pool. That is how it worked in > 0.94. > >> >From the logs it demoted my compact to the small pool. > >> > > >> >-randy > >> > > >> > > >> > > >> >On 10/6/15, 4:32 PM, "Vladimir Rodionov" > wrote: > >> > > >> >>>> If I read this correct the size is 4.8G and the throttle is 2.5G > so it > >> >>should have been put into the Large compaction pool. > >> >> > >> >>You answered your question yourself. Minor compaction in the same > pool (1 > >> >>thread default) will be waiting until major is finished. > >> >> > >> >>-Vlad > >> >> > >> >> > >> >>On Tue, Oct 6, 2015 at 3:59 PM, Randy Fox wrote= : > >> >> > >> >>> 2015-10-06 14:50:35,644 INFO > >> org.apache.hadoop.hbase.regionserver.HStore: > >> >>> Starting compaction of 4 file(s) in L of PROD_audience4,\x00 > >> >>> \xB6\x0B\xA7,\x186,1443751119137.26f321d7b240c85a9350a95f6c288e49. > into > >> >>> > >> > tmpdir=3Dhdfs://woz/hbase/data/default/PROD_audience4/26f321d7b240c85a935= 0a95f6c288e49/.tmp, > >> >>> totalSize=3D4.8 G > >> >>> 2015-10-06 14:50:35,646 DEBUG > >> >>> org.apache.hadoop.hbase.regionserver.CompactSplitThread: Small > >> Compaction > >> >>> requested: > >> >>> > >> > org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompaction= Context@7f236eb8 > >> ; > >> >>> Because: User-triggered major compaction; compaction_queue=3D(0:0)= , > >> >>> split_queue=3D0, merge_queue=3D0 > >> >>> > >> >>> > >> >>> If I read this correct the size is 4.8G and the throttle is 2.5G s= o > it > >> >>> should have been put into the Large compaction pool. > >> >>> > >> >>> > >> >>> > >> >>> > >> >>> > >> >>> On 10/6/15, 3:07 PM, "Randy Fox" wrote: > >> >>> > >> >>> >We just did a big leap forward from 0.94 to 1.0. We do our own > major > >> >>> compacts manually every night. One of the first things we noticed = is > >> that > >> >>> when a major compact runs, no minors run. The compaction queue > grows > >> and > >> >>> when the major compact finishes the minors then run. I have not > >> found any > >> >>> new knobs we should be setting. Any ideas? > >> >>> >Our config is: > >> >>> > > >> >>> > > >> >>> > hbase.hregion.majorcompaction > >> >>> > 0 > >> >>> > true > >> >>> > > >> >>> > > >> >>> > hbase.hstore.compactionThreshold > >> >>> > 3 > >> >>> > > >> >>> > > >> >>> > > >> >>> > hbase.hstore.compaction.max > >> >>> > 9 > >> >>> > > >> >>> > > >> >>> > hbase.regionserver.thread.compaction.throttle > >> >>> > 2684354560 > >> >>> > > >> >>> > > >> >>> > > >> >>> >Thanks in advance, > >> >>> > > >> >>> >Randy > >> >>> > >> > --94eb2c0870dc8d93ac05219905ba--