You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2017/08/23 00:42:04 UTC
phoenix git commit: PHOENIX-4114 Derive ConcurrentMutationsIT from
ParallelStatsDisabledIT
Repository: phoenix
Updated Branches:
refs/heads/master 16e0511ff -> fd893ef47
PHOENIX-4114 Derive ConcurrentMutationsIT from ParallelStatsDisabledIT
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/fd893ef4
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/fd893ef4
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/fd893ef4
Branch: refs/heads/master
Commit: fd893ef47be0780ab8b7c5991426092fd504b322
Parents: 16e0511
Author: James Taylor <ja...@apache.org>
Authored: Tue Aug 22 15:03:02 2017 -0700
Committer: James Taylor <ja...@apache.org>
Committed: Tue Aug 22 15:03:02 2017 -0700
----------------------------------------------------------------------
.../phoenix/end2end/ConcurrentMutationsIT.java | 27 ++++----------------
1 file changed, 5 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/fd893ef4/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
index a690541..83b9913 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConcurrentMutationsIT.java
@@ -27,7 +27,6 @@ import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.util.Map;
import java.util.Properties;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -45,23 +44,18 @@ import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.phoenix.jdbc.PhoenixConnection;
import org.apache.phoenix.query.ConnectionQueryServices;
-import org.apache.phoenix.query.QueryServices;
import org.apache.phoenix.query.QueryServicesOptions;
import org.apache.phoenix.util.IndexScrutiny;
import org.apache.phoenix.util.PhoenixRuntime;
import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
import org.apache.phoenix.util.Repeat;
import org.apache.phoenix.util.RunUntilFailure;
import org.apache.phoenix.util.TestUtil;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import com.google.common.collect.Maps;
-
@RunWith(RunUntilFailure.class)
-public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
+public class ConcurrentMutationsIT extends ParallelStatsDisabledIT {
private static final Random RAND = new Random(5);
private static final String MVCC_LOCK_TEST_TABLE_PREFIX = "MVCCLOCKTEST_";
private static final String LOCK_TEST_TABLE_PREFIX = "LOCKTEST_";
@@ -88,7 +82,7 @@ public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
final String tableName = generateUniqueName();
final String indexName = generateUniqueName();
Connection conn = DriverManager.getConnection(getUrl());
- conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 INTEGER NOT NULL, k2 INTEGER NOT NULL, v1 INTEGER, CONSTRAINT pk PRIMARY KEY (k1,k2))");
+ conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 INTEGER NOT NULL, k2 INTEGER NOT NULL, v1 INTEGER, CONSTRAINT pk PRIMARY KEY (k1,k2)) COLUMN_ENCODED_BYTES = 0");
addDelayingCoprocessor(conn, tableName);
conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + tableName + "(v1)");
final CountDownLatch doneSignal = new CountDownLatch(2);
@@ -239,7 +233,7 @@ public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
final String tableName = generateUniqueName();
final String indexName = generateUniqueName();
Connection conn = DriverManager.getConnection(getUrl());
- conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 INTEGER NOT NULL, k2 INTEGER NOT NULL, v1 INTEGER, CONSTRAINT pk PRIMARY KEY (k1,k2)) STORE_NULLS=true, VERSIONS=1");
+ conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 INTEGER NOT NULL, k2 INTEGER NOT NULL, v1 INTEGER, CONSTRAINT pk PRIMARY KEY (k1,k2)) COLUMN_ENCODED_BYTES = 0, VERSIONS=1");
addDelayingCoprocessor(conn, tableName);
conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + tableName + "(v1)");
final CountDownLatch doneSignal = new CountDownLatch(nThreads);
@@ -285,7 +279,7 @@ public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
final String indexName = generateUniqueName();
Connection conn = DriverManager.getConnection(getUrl());
- conn.createStatement().execute("CREATE TABLE " + tableName + "(k VARCHAR PRIMARY KEY, v INTEGER)");
+ conn.createStatement().execute("CREATE TABLE " + tableName + "(k VARCHAR PRIMARY KEY, v INTEGER) COLUMN_ENCODED_BYTES = 0");
addDelayingCoprocessor(conn, tableName);
conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + tableName + "(v)");
final CountDownLatch doneSignal = new CountDownLatch(2);
@@ -340,7 +334,7 @@ public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
final String tableName = MVCC_LOCK_TEST_TABLE_PREFIX + generateUniqueName();
final String indexName = generateUniqueName();
Connection conn = DriverManager.getConnection(getUrl());
- conn.createStatement().execute("CREATE TABLE " + tableName + "(k VARCHAR PRIMARY KEY, v INTEGER)");
+ conn.createStatement().execute("CREATE TABLE " + tableName + "(k VARCHAR PRIMARY KEY, v INTEGER) COLUMN_ENCODED_BYTES = 0");
conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + tableName + "(v,k)");
conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES ('foo',0)");
conn.commit();
@@ -410,17 +404,6 @@ public class ConcurrentMutationsIT extends BaseUniqueNamesOwnClusterIT {
return rs.getLong(1);
}
- @BeforeClass
- public static void doSetup() throws Exception {
- Map<String, String> clientProps = Maps.newHashMapWithExpectedSize(10);
- clientProps.put(QueryServices.DEFAULT_COLUMN_ENCODED_BYTES_ATRRIB, Integer.toString(0));
- Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(10);
- serverProps.put("hbase.rowlock.wait.duration", Integer.toString(ROW_LOCK_WAIT_TIME));
- serverProps.put(QueryServices.MUTATE_BATCH_SIZE_BYTES_ATTRIB, Integer.toString(3));
- setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), new ReadOnlyProps(clientProps.entrySet().iterator()));
- }
-
-
public static class DelayingRegionObserver extends SimpleRegionObserver {
private volatile boolean lockedTableRow;