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 5003418853 for ; Thu, 14 Jan 2016 17:28:12 +0000 (UTC) Received: (qmail 40049 invoked by uid 500); 14 Jan 2016 17:28:12 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 40011 invoked by uid 500); 14 Jan 2016 17:28:12 -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 40002 invoked by uid 99); 14 Jan 2016 17:28:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 17:28:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CC5CEE3856; Thu, 14 Jan 2016 17:28:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmhsieh@apache.org To: commits@hbase.apache.org Message-Id: <58f206b1e49a4efc81a27c13bb65e632@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-15104 Occasional failures due to NotServingRegionException in IT tests (Huaxiang Sun) Date: Thu, 14 Jan 2016 17:28:11 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/0.98 b27c62f80 -> f46bee0a7 HBASE-15104 Occasional failures due to NotServingRegionException in IT tests (Huaxiang Sun) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f46bee0a Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f46bee0a Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f46bee0a Branch: refs/heads/0.98 Commit: f46bee0a7dd0dd315d9681a63000ab3cfa716656 Parents: b27c62f Author: Jonathan M Hsieh Authored: Thu Jan 14 07:59:33 2016 -0800 Committer: Jonathan M Hsieh Committed: Thu Jan 14 09:27:30 2016 -0800 ---------------------------------------------------------------------- .../chaos/actions/ChangeCompressionAction.java | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/f46bee0a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeCompressionAction.java ---------------------------------------------------------------------- diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeCompressionAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeCompressionAction.java index eefc7fa..fdf99b1 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeCompressionAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/ChangeCompressionAction.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.io.compress.Compression.Algorithm; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.io.compress.Compressor; /** * Action that changes the compression algorithm on a column family from a list of tables. @@ -64,7 +65,25 @@ public class ChangeCompressionAction extends Action { // Since not every compression algorithm is supported, // let's use the same algorithm for all column families. - Algorithm algo = possibleAlgos[random.nextInt(possibleAlgos.length)]; + + // If an unsupported compression algorithm is chosen, pick a different one. + // This is to work around the issue that modifyTable() does not throw remote + // exception. + Algorithm algo; + do { + algo = possibleAlgos[random.nextInt(possibleAlgos.length)]; + + try { + Compressor c = algo.getCompressor(); + + // call returnCompressor() to release the Compressor + algo.returnCompressor(c); + break; + } catch (Throwable t) { + LOG.info("Performing action: Changing compression algorithms to " + algo + + " is not supported, pick another one"); + } + } while (true); LOG.debug("Performing action: Changing compression algorithms on " + tableNameString + " to " + algo);