Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F20E8D2E6 for ; Sat, 8 Dec 2012 00:47:20 +0000 (UTC) Received: (qmail 67089 invoked by uid 500); 8 Dec 2012 00:47:20 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 67055 invoked by uid 500); 8 Dec 2012 00:47:20 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 67047 invoked by uid 99); 8 Dec 2012 00:47:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Dec 2012 00:47:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Dec 2012 00:47:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8B67B23889BB; Sat, 8 Dec 2012 00:46:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1418571 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java Date: Sat, 08 Dec 2012 00:46:57 -0000 To: commits@hbase.apache.org From: jdcryans@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121208004657.8B67B23889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdcryans Date: Sat Dec 8 00:46:56 2012 New Revision: 1418571 URL: http://svn.apache.org/viewvc?rev=1418571&view=rev Log: HBASE-7300 HbckTestingUtil needs to keep a static executor to lower the number of threads used Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java?rev=1418571&r1=1418570&r2=1418571&view=diff ============================================================================== --- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java (original) +++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/hbck/HbckTestingUtil.java Sat Dec 8 00:46:56 2012 @@ -30,6 +30,7 @@ import org.apache.hadoop.hbase.util.HBas import org.apache.hadoop.hbase.util.HBaseFsck.ErrorReporter.ERROR_CODE; public class HbckTestingUtil { + private static ExecutorService exec = new ScheduledThreadPoolExecutor(10); public static HBaseFsck doFsck( Configuration conf, boolean fix) throws Exception { return doFsck(conf, fix, null); @@ -44,7 +45,7 @@ public class HbckTestingUtil { boolean fixMeta, boolean fixHdfsHoles, boolean fixHdfsOverlaps, boolean fixHdfsOrphans, boolean fixTableOrphans, boolean fixVersionFile, String table) throws Exception { - HBaseFsck fsck = new HBaseFsck(conf); + HBaseFsck fsck = new HBaseFsck(conf, exec); fsck.connect(); fsck.setDisplayFullReport(); // i.e. -details fsck.setTimeLag(0); @@ -71,7 +72,6 @@ public class HbckTestingUtil { */ public static HBaseFsck doHFileQuarantine(Configuration conf, String table) throws Exception { String[] args = {"-sidelineCorruptHFiles", "-ignorePreCheckPermission", table}; - ExecutorService exec = new ScheduledThreadPoolExecutor(10); HBaseFsck hbck = new HBaseFsck(conf, exec); hbck.exec(exec, args); return hbck;