hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [4/5] hbase git commit: HBASE-16190 IntegrationTestDDLMasterFailover failed with IllegalArgumentException: n must be positive (Romil Choksi and Heng Chen)
Date Thu, 07 Jul 2016 23:50:25 GMT
HBASE-16190 IntegrationTestDDLMasterFailover failed with IllegalArgumentException: n must be
positive (Romil Choksi and Heng Chen)

Conflicts:
	hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/075f33a0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/075f33a0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/075f33a0

Branch: refs/heads/branch-1.2
Commit: 075f33a06ab27f35fc9d4e46b7bf2220d47992d1
Parents: 8f8736d
Author: Enis Soztutar <enis@apache.org>
Authored: Thu Jul 7 16:34:08 2016 -0700
Committer: Enis Soztutar <enis@apache.org>
Committed: Thu Jul 7 16:43:53 2016 -0700

----------------------------------------------------------------------
 .../hbase/IntegrationTestDDLMasterFailover.java     | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/075f33a0/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
index b4a7647..24209ae 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
@@ -25,13 +25,17 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.math.RandomUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.client.*;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.testclassification.IntegrationTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.HBaseFsck;
@@ -202,12 +206,12 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase
{
     // TableAction has implemented selectTable() shared by multiple table Actions
     protected HTableDescriptor selectTable(ConcurrentHashMap<TableName, HTableDescriptor>
tableMap)
     {
-      // randomly select table from tableMap
-      if (tableMap.isEmpty()){
-        return null;
-      }
       // synchronization to prevent removal from multiple threads
       synchronized (tableMap){
+        // randomly select table from tableMap
+        if (tableMap.isEmpty()) {
+          return null;
+        }
         ArrayList<TableName> tableList = new ArrayList<TableName>(tableMap.keySet());
         TableName randomKey = tableList.get(RandomUtils.nextInt(tableList.size()));
         HTableDescriptor randomHtd = tableMap.get(randomKey);


Mime
View raw message