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 76E6F9891 for ; Thu, 17 May 2012 19:04:12 +0000 (UTC) Received: (qmail 97039 invoked by uid 500); 17 May 2012 19:04:08 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 96695 invoked by uid 500); 17 May 2012 19:04:08 -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 96679 invoked by uid 500); 17 May 2012 19:04:08 -0000 Delivered-To: apmail-hadoop-hbase-user@hadoop.apache.org Received: (qmail 96674 invoked by uid 99); 17 May 2012 19:04:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 19:04:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jxiang@cloudera.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 19:04:03 +0000 Received: by obbef5 with SMTP id ef5so4153913obb.35 for ; Thu, 17 May 2012 12:03:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=AxN6YV9XdSYgWIMQd3Mn0i0auzPSnYwnBn6n4IBCxH0=; b=p2fUqT7jhPY/SZMA3zIXNSdnnyWKCAg80YEen8voyegoLM1VbLpBnO6+5OOv1GNbBa Nwhb3gScAut8y6oAoCybkWGQ6s0VsBuXhoqtP1Yo9+2Ufyc1gtgGmvmGIXoeUGraHxfY sdEf+yhMT3MHD6H+mrlQ7LOVqOWKx5gxxaOPc4tVmOf0mmoXEiU1GRAsDEI+UmvqHGW6 BmTE22gDUpqZrPj6AFnB3N3SoqnotfqcxwpzmKaeSHOJ/AfWvsChkm5nc2fEO9kpbVLy IPVZscZ68LnuhoHbQ6n/ttIvOnJ9KuUXFoWxp+xc9b2mj8de/l3OsJV5s2IcfW3JwBw4 V7NA== MIME-Version: 1.0 Received: by 10.182.47.105 with SMTP id c9mr7782113obn.49.1337281422938; Thu, 17 May 2012 12:03:42 -0700 (PDT) Received: by 10.182.152.35 with HTTP; Thu, 17 May 2012 12:03:42 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 May 2012 12:03:42 -0700 Message-ID: Subject: Re: Schedule major compaction programmatically From: Jimmy Xiang To: user@hbase.apache.org Cc: hbase-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=14dae93997692dd35804c04018ce X-Gm-Message-State: ALoCoQnnjqJRNGADQshwLZODYr+E7U3K7rj4DHaYEL87eSmXCCKLCxHXFB/zHesY9jX+0eYOdXXD X-Virus-Checked: Checked by ClamAV on apache.org --14dae93997692dd35804c04018ce Content-Type: text/plain; charset=ISO-8859-1 HRegionServer.java: this.metrics.compactionQueueSize.set(compactSplitThread .getCompactionQueueSize()); On Thu, May 17, 2012 at 12:00 PM, Chen Song wrote: > Can you direct me to the API call to get the queue size metrics? > > On Thu, May 17, 2012 at 2:58 PM, Jimmy Xiang wrote: > > > It is an async call to the region server to request a compaction. Once > the > > request is accepted, > > the call returned. There is no sync call here. The request is queued > and > > processed by a pool > > of threads. > > > > Currently, there is a metric to show the queue size. But it doesn't tell > > how many are for major, > > and how many are for minor. The queue size is the number of store files > > pending compact. > > > > As I know, there is no work around for now. > > > > Jimmy > > > > > > On Thu, May 17, 2012 at 11:42 AM, Chen Song > > wrote: > > > > > Thanks Jimmy. Meanwhile, is there a work around for this? > > > > > > How does compact/major_compact issued from hbase shell handles this > under > > > the hood? Is it eventually calling HBaseAdmin API or HRegion > synchronous > > > API call? > > > > > > Thanks > > > Chen > > > > > > On Thu, May 17, 2012 at 2:24 PM, Jimmy Xiang > > wrote: > > > > > > > I am thinking to add a function to check if a table or region in > > > compaction > > > > (major or minor). > > > > > > > > I filed HBASE-6033. It won't show status of a specific compaction > > > request. > > > > Will this help? > > > > > > > > Thanks, > > > > Jimmy > > > > > > > > On Thu, May 17, 2012 at 11:11 AM, Chen Song > > > > wrote: > > > > > > > > > I would like to schedule major compaction on a region > > > programmatically. I > > > > > found the API call below which can properly achieve my goal. > > > > > > > > > > HBaseAdmin.majorCompact(String tableOrRegionName) > > > > > > > > > > It turns out to be an asynchronous call and there seems no call > back > > > > > parameter that can be specified. How can I validate the compaction > > > result > > > > > (e.g., success or failure) ? > > > > > > > > > > Thanks > > > > > Chen > > > > > > > > > > > > > > > > > > > > > -- > > > Chen Song > > > Mobile: 518-445-5096 > > > > > > > > > -- > Chen Song > Mobile: 518-445-5096 > --14dae93997692dd35804c04018ce--