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 D0B2C172C0 for ; Sat, 1 Nov 2014 00:30:18 +0000 (UTC) Received: (qmail 57907 invoked by uid 500); 1 Nov 2014 00:30:18 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 57861 invoked by uid 500); 1 Nov 2014 00:30:18 -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 57852 invoked by uid 99); 1 Nov 2014 00:30:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Nov 2014 00:30:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6BE3B92AFB0; Sat, 1 Nov 2014 00:30:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ndimiduk@apache.org To: commits@hbase.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: HBASE-12401 Add some timestamp signposts in IntegrationTestMTTR Date: Sat, 1 Nov 2014 00:30:18 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/0.98 a21352f4d -> d65d0cb92 HBASE-12401 Add some timestamp signposts in IntegrationTestMTTR Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d65d0cb9 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d65d0cb9 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d65d0cb9 Branch: refs/heads/0.98 Commit: d65d0cb92d8e7a418ae20bd58f8c692922d2cf4a Parents: a21352f Author: Nick Dimiduk Authored: Fri Oct 31 15:09:18 2014 -0700 Committer: Nick Dimiduk Committed: Fri Oct 31 17:28:00 2014 -0700 ---------------------------------------------------------------------- .../hadoop/hbase/mttr/IntegrationTestMTTR.java | 49 +++++++++++--------- .../org/apache/hadoop/hbase/HBaseCluster.java | 5 +- 2 files changed, 31 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/d65d0cb9/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java ---------------------------------------------------------------------- diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java index 9571314..8060538 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java @@ -276,6 +276,7 @@ public class IntegrationTestMTTR { public void run(Callable monkeyCallable, String testName) throws Exception { int maxIters = util.getHBaseClusterInterface().isDistributedCluster() ? 10 : 3; + LOG.info("Starting " + testName + " with " + maxIters + " iterations."); // Array to keep track of times. ArrayList resultPuts = new ArrayList(maxIters); @@ -283,33 +284,39 @@ public class IntegrationTestMTTR { ArrayList resultAdmin = new ArrayList(maxIters); long start = System.nanoTime(); - // We're going to try this multiple times - for (int fullIterations = 0; fullIterations < maxIters; fullIterations++) { - // Create and start executing a callable that will kill the servers - Future monkeyFuture = executorService.submit(monkeyCallable); + try { + // We're going to try this multiple times + for (int fullIterations = 0; fullIterations < maxIters; fullIterations++) { + // Create and start executing a callable that will kill the servers + Future monkeyFuture = executorService.submit(monkeyCallable); - // Pass that future to the timing Callables. - Future putFuture = executorService.submit(new PutCallable(monkeyFuture)); - Future scanFuture = executorService.submit(new ScanCallable(monkeyFuture)); - Future adminFuture = executorService.submit(new AdminCallable(monkeyFuture)); + // Pass that future to the timing Callables. + Future putFuture = executorService.submit(new PutCallable(monkeyFuture)); + Future scanFuture = executorService.submit(new ScanCallable(monkeyFuture)); + Future adminFuture = executorService.submit(new AdminCallable(monkeyFuture)); - Future loadFuture = executorService.submit(new LoadCallable(monkeyFuture)); + Future loadFuture = executorService.submit(new LoadCallable(monkeyFuture)); - monkeyFuture.get(); - loadFuture.get(); + monkeyFuture.get(); + loadFuture.get(); - // Get the values from the futures. - TimingResult putTime = putFuture.get(); - TimingResult scanTime = scanFuture.get(); - TimingResult adminTime = adminFuture.get(); + // Get the values from the futures. + TimingResult putTime = putFuture.get(); + TimingResult scanTime = scanFuture.get(); + TimingResult adminTime = adminFuture.get(); - // Store the times to display later. - resultPuts.add(putTime); - resultScan.add(scanTime); - resultAdmin.add(adminTime); + // Store the times to display later. + resultPuts.add(putTime); + resultScan.add(scanTime); + resultAdmin.add(adminTime); - // Wait some time for everything to settle down. - Thread.sleep(5000l); + // Wait some time for everything to settle down. + Thread.sleep(5000l); + } + } catch (Exception e) { + long runtimeMs = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS); + LOG.info(testName + " failed after " + runtimeMs + "ms.", e); + throw e; } long runtimeMs = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS); http://git-wip-us.apache.org/repos/asf/hbase/blob/d65d0cb9/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java index fd546c4..4232f97 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java @@ -95,7 +95,7 @@ public abstract class HBaseCluster implements Closeable, Configurable { } /** - * Returns an {@link MasterAdminService.BlockingInterface} to the active master + * Returns an {@link MasterService.BlockingInterface} to the active master */ public abstract MasterService.BlockingInterface getMaster() throws IOException; @@ -150,7 +150,8 @@ public abstract class HBaseCluster implements Closeable, Configurable { } Threads.sleep(100); } - throw new IOException("did timeout waiting for region server to start:" + hostname); + throw new IOException("did timeout " + timeout + "ms waiting for region server to start: " + + hostname); } /**