phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [2/3] phoenix git commit: PHOENIX-3930 Move BaseQueryIT to ParallelStatsDisabledIT
Date Fri, 09 Jun 2017 18:19:43 GMT
PHOENIX-3930 Move BaseQueryIT to ParallelStatsDisabledIT


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2708e2e5
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2708e2e5
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2708e2e5

Branch: refs/heads/4.x-HBase-1.1
Commit: 2708e2e5f8b8177d9221228a7bb840b05b07c3aa
Parents: 7862e55
Author: James Taylor <jamestaylor@apache.org>
Authored: Fri Jun 9 10:28:06 2017 -0700
Committer: James Taylor <jamestaylor@apache.org>
Committed: Fri Jun 9 11:17:51 2017 -0700

----------------------------------------------------------------------
 .../phoenix/end2end/AggregateQueryIT.java       |  2 +-
 .../org/apache/phoenix/end2end/BaseQueryIT.java | 60 +++++---------
 .../apache/phoenix/end2end/CaseStatementIT.java |  2 +-
 .../apache/phoenix/end2end/CastAndCoerceIT.java |  2 +-
 .../end2end/ClientTimeArithmeticQueryIT.java    | 42 +++++-----
 .../end2end/ColumnProjectionOptimizationIT.java |  1 -
 .../org/apache/phoenix/end2end/GroupByIT.java   | 39 +++------
 .../apache/phoenix/end2end/MutableQueryIT.java  | 14 +---
 .../org/apache/phoenix/end2end/NotQueryIT.java  |  2 +-
 .../phoenix/end2end/PointInTimeQueryIT.java     | 37 +++------
 .../end2end/QueryDatabaseMetaDataIT.java        | 85 +++++++++++++-------
 .../org/apache/phoenix/end2end/QueryIT.java     |  2 +-
 .../org/apache/phoenix/end2end/ScanQueryIT.java |  2 +-
 .../java/org/apache/phoenix/query/BaseTest.java |  9 ---
 14 files changed, 132 insertions(+), 167 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java
index a205814..9a82e4b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java
@@ -46,7 +46,7 @@ import org.junit.Test;
 public class AggregateQueryIT extends BaseQueryIT {
 
     public AggregateQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
index 9a58b5b..2c2ea9c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
@@ -30,18 +30,16 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PTableImpl;
 import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
-import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -61,7 +59,7 @@ import com.google.common.collect.Maps;
  */
 
 @RunWith(Parameterized.class)
-public abstract class BaseQueryIT extends BaseClientManagedTimeIT {
+public abstract class BaseQueryIT extends ParallelStatsDisabledIT {
     protected static final String tenantId = getOrganizationId();
     protected static final String ATABLE_INDEX_NAME = "ATABLE_IDX";
     protected static final long BATCH_SIZE = 3;
@@ -79,26 +77,19 @@ public abstract class BaseQueryIT extends BaseClientManagedTimeIT {
             "CREATE LOCAL INDEX %s ON %s (a_integer) INCLUDE ("
                     + "    A_STRING, " + "    B_STRING, " + "    A_DATE)", 
             "" };
-
+    
     @BeforeClass
-    @Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
+    @Shadower(classBeingShadowed = ParallelStatsDisabledIT.class)
     public static void doSetup() throws Exception {
-        doSetup(null);
-    }
-    
-    protected static void doSetup(Map<String,String> customProps) throws Exception {
-        Map<String,String> props = getDefaultProps();
-        if(customProps != null) {
-        	props.putAll(customProps);
-        }
+        Map<String,String> props = Maps.newHashMapWithExpectedSize(5);
+        // Must update config before starting server
+        props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, Boolean.FALSE.toString());
         // Make a small batch size to test multiple calls to reserve sequences
         props.put(QueryServices.SEQUENCE_CACHE_SIZE_ATTRIB, Long.toString(BATCH_SIZE));
         // Must update config before starting server
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
     }
     
-    private static Map<Pair<String, String>, Pair<String, String>> namesByParams = Maps.newHashMapWithExpectedSize(10);
-    
     protected long ts;
     protected Date date;
     private String indexDDL;
@@ -106,7 +97,7 @@ public abstract class BaseQueryIT extends BaseClientManagedTimeIT {
     protected String tableName;
     protected String indexName;
     
-    public BaseQueryIT(String idxDdl, boolean mutable, boolean columnEncoded) {
+    public BaseQueryIT(String idxDdl, boolean mutable, boolean columnEncoded, boolean keepDeletedCells) {
         StringBuilder optionBuilder = new StringBuilder();
         if (!columnEncoded) {
             optionBuilder.append("COLUMN_ENCODED_BYTES=0");
@@ -119,37 +110,28 @@ public abstract class BaseQueryIT extends BaseClientManagedTimeIT {
                 optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
             }
         }
+        if (keepDeletedCells) {
+            if (optionBuilder.length()>0)
+                optionBuilder.append(",");
+            optionBuilder.append(HColumnDescriptor.KEEP_DELETED_CELLS + "=true");
+        }
         this.tableDDLOptions = optionBuilder.toString();
         try {
             this.ts = nextTimestamp();
-            Pair<String, String> runParam = new Pair<>(idxDdl, tableDDLOptions);
-            Pair<String, String> tableIndexNames = namesByParams.get(runParam);
-            if (tableIndexNames == null) {
-                this.tableName = initATableValues(null, tenantId, getDefaultSplits(tenantId), date=new Date(System.currentTimeMillis()), ts, getUrl(), tableDDLOptions);
-                this.indexName = generateUniqueName();
-                namesByParams.put(runParam, new Pair<>(tableName, indexName));
-                if (idxDdl.length() > 0) {
-                    this.indexDDL = String.format(idxDdl, indexName, tableName);
-                    Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-                    props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
-                    Connection conn = DriverManager.getConnection(getUrl(), props);
-                    conn.createStatement().execute(this.indexDDL);
-                }
-            } else {
-                this.tableName = tableIndexNames.getFirst();
-                this.indexName = tableIndexNames.getSecond();
-                initATableValues(this.tableName, tenantId, getDefaultSplits(tenantId), date=new Date(System.currentTimeMillis()), ts, getUrl(), tableDDLOptions);
+            this.tableName = initATableValues(generateUniqueName(), tenantId, getDefaultSplits(tenantId), date=new Date(System.currentTimeMillis()), ts, getUrl(), tableDDLOptions);
+            this.indexName = generateUniqueName();
+            if (idxDdl.length() > 0) {
+                this.indexDDL = String.format(idxDdl, indexName, tableName);
+                Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+                props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
+                Connection conn = DriverManager.getConnection(getUrl(), props);
+                conn.createStatement().execute(this.indexDDL);
             }
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
     }
     
-    @Before
-    public void init() throws Exception {
-        this.ts = nextTimestamp();
-    }
-    
     @Parameters(name="indexDDL={0},mutable={1},columnEncoded={2}")
     public static Collection<Object> data() {
         List<Object> testCases = Lists.newArrayList();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/CaseStatementIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CaseStatementIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CaseStatementIT.java
index 31b08db..ee18152 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CaseStatementIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CaseStatementIT.java
@@ -56,7 +56,7 @@ import com.google.common.collect.Lists;
 public class CaseStatementIT extends BaseQueryIT {
 
     public CaseStatementIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Parameters(name="CaseStatementIT_{index}") // name is used by failsafe as file name in reports

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/CastAndCoerceIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CastAndCoerceIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CastAndCoerceIT.java
index bab18d5..e574286 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CastAndCoerceIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CastAndCoerceIT.java
@@ -44,7 +44,7 @@ import org.junit.runners.Parameterized.Parameters;
 public class CastAndCoerceIT extends BaseQueryIT {
 
     public CastAndCoerceIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Parameters(name="CastAndCoerceIT_{index}") // name is used by failsafe as file name in reports

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 3330a08..c981bb5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -61,7 +61,7 @@ import com.google.common.collect.Lists;
 public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
 
     public ClientTimeArithmeticQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Parameters(name="ClientTimeArithmeticQueryIT_{index}") // name is used by failsafe as file name in reports
@@ -650,23 +650,23 @@ public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
       conn = DriverManager.getConnection(getUrl(), props);
       conn.createStatement()
               .execute(
-                      "create table timestamp_table (ts timestamp primary key)");
+                      "create table " + tableName + " (ts timestamp primary key)");
       conn.close();
 
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
       conn = DriverManager.getConnection(getUrl(), props);
-      stmt = conn.prepareStatement("upsert into timestamp_table values (?)");
+      stmt = conn.prepareStatement("upsert into " + tableName + " values (?)");
       stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
       stmt.execute();
       conn.commit();
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 60));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts FROM timestamp_table");
+      rs = conn.createStatement().executeQuery("SELECT ts FROM " + tableName + "");
       assertTrue(rs.next());
       assertEquals("1995-05-02 01:01:01.000000001",rs.getTimestamp(1).toString());
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 70));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM timestamp_table");
+      rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tableName + "");
       assertTrue(rs.next());
       assertEquals("1995-05-03 01:01:01.000000001",rs.getTimestamp(1).toString());
     }
@@ -683,23 +683,23 @@ public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
       conn = DriverManager.getConnection(getUrl(), props);
       conn.createStatement()
               .execute(
-                      "create table timestamp_table (ts timestamp primary key)");
+                      "create table " + tableName + " (ts timestamp primary key)");
       conn.close();
 
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
       conn = DriverManager.getConnection(getUrl(), props);
-      stmt = conn.prepareStatement("upsert into timestamp_table values (?)");
+      stmt = conn.prepareStatement("upsert into " + tableName + " values (?)");
       stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
       stmt.execute();
       conn.commit();
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 60));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts FROM timestamp_table");
+      rs = conn.createStatement().executeQuery("SELECT ts FROM " + tableName);
       assertTrue(rs.next());
       assertEquals("1995-05-02 01:01:01.000000001",rs.getTimestamp(1).toString());
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 70));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM timestamp_table");
+      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tableName);
       assertTrue(rs.next());
       assertEquals("1995-05-01 01:01:01.000000001",rs.getTimestamp(1).toString());
     }
@@ -716,24 +716,24 @@ public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
       conn = DriverManager.getConnection(getUrl(), props);
       conn.createStatement()
               .execute(
-                      "create table time_table (ts time primary key)");
+                      "create table " + tableName + " (ts time primary key)");
       conn.close();
 
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
       conn = DriverManager.getConnection(getUrl(), props);
-      stmt = conn.prepareStatement("upsert into time_table values (?)");
+      stmt = conn.prepareStatement("upsert into " + tableName + " values (?)");
       Time time = new Time(1995 - 1900, 4, 2);
       stmt.setTime(1, time);
       stmt.execute();
       conn.commit();
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 60));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts FROM time_table");
+      rs = conn.createStatement().executeQuery("SELECT ts FROM " + tableName);
       assertTrue(rs.next());
       assertEquals(time.getTime(),rs.getTimestamp(1).getTime());
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 70));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM time_table");
+      rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tableName);
       assertTrue(rs.next());
       assertEquals(time.getTime() + MILLIS_IN_DAY,rs.getTimestamp(1).getTime());
     }
@@ -750,24 +750,24 @@ public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
       conn = DriverManager.getConnection(getUrl(), props);
       conn.createStatement()
               .execute(
-                      "create table time_table (ts time primary key)");
+                      "create table " + tableName + " (ts time primary key)");
       conn.close();
 
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
       conn = DriverManager.getConnection(getUrl(), props);
-      stmt = conn.prepareStatement("upsert into time_table values (?)");
+      stmt = conn.prepareStatement("upsert into " + tableName + " values (?)");
       Time time = new Time(1995 - 1900, 4, 2);
       stmt.setTime(1, time);
       stmt.execute();
       conn.commit();
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 60));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts FROM time_table");
+      rs = conn.createStatement().executeQuery("SELECT ts FROM " + tableName + "");
       assertTrue(rs.next());
       assertEquals(time.getTime(),rs.getTimestamp(1).getTime());
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 70));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM time_table");
+      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tableName);
       assertTrue(rs.next());
       assertEquals(time.getTime() - MILLIS_IN_DAY,rs.getTimestamp(1).getTime());
     }
@@ -784,23 +784,23 @@ public class ClientTimeArithmeticQueryIT extends BaseQueryIT {
       conn = DriverManager.getConnection(getUrl(), props);
       conn.createStatement()
               .execute(
-                      "create table date_table (ts date primary key)");
+                      "create table " + tableName + " (ts date primary key)");
       conn.close();
 
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
       conn = DriverManager.getConnection(getUrl(), props);
-      stmt = conn.prepareStatement("upsert into date_table values (?)");
+      stmt = conn.prepareStatement("upsert into " + tableName + " values (?)");
       stmt.setDate(1, new Date(1995 - 1900, 4, 2));
       stmt.execute();
       conn.commit();
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 60));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts FROM date_table");
+      rs = conn.createStatement().executeQuery("SELECT ts FROM " + tableName);
       assertTrue(rs.next());
       assertEquals("1995-05-02",rs.getDate(1).toString());
       props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 70));
       conn = DriverManager.getConnection(getUrl(), props);
-      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM date_table");
+      rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tableName);
       assertTrue(rs.next());
       assertEquals("1995-05-01",rs.getDate(1).toString());
     }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
index 9a56136..cfc48f6 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
@@ -63,7 +63,6 @@ import org.junit.Test;
 
 public class ColumnProjectionOptimizationIT extends BaseClientManagedTimeIT {
 
-    private String tableName; 
     @Test
     public void testSelect() throws Exception {
         long ts = nextTimestamp();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByIT.java
index 7f64fee..5daf4de 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByIT.java
@@ -35,26 +35,21 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.Statement;
 import java.util.Collection;
-import java.util.Map;
 import java.util.Properties;
 
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
-import com.google.common.collect.Maps;
-
 
 @RunWith(Parameterized.class)
 public class GroupByIT extends BaseQueryIT {
 
     public GroupByIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, true);
     }
     
     @Parameters(name="GroupByIT_{index}") // name is used by failsafe as file name in reports
@@ -62,14 +57,6 @@ public class GroupByIT extends BaseQueryIT {
         return QueryIT.data();
     }
     
-    @BeforeClass
-    @Shadower(classBeingShadowed = BaseQueryIT.class)
-    public static void doSetup() throws Exception {
-    	Map<String,String> props = Maps.newHashMapWithExpectedSize(3);
-    	props.put(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, "true");
-    	BaseQueryIT.doSetup(props);
-    }
-    
     @Test
     public void testNoWhereScan() throws Exception {
         String query = "SELECT y_integer FROM " + tableName;
@@ -456,19 +443,19 @@ public class GroupByIT extends BaseQueryIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 10));
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String ddl = "create table test1(\"time\" integer not null, hostname varchar not null,usage float,period integer constraint pk PRIMARY KEY(\"time\", hostname))";
+        String ddl = "create table " + tableName + "(\"time\" integer not null, hostname varchar not null,usage float,period integer constraint pk PRIMARY KEY(\"time\", hostname))";
         conn.createStatement().execute(ddl);
         conn.close();
 
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
         conn = DriverManager.getConnection(getUrl(), props);
-        PreparedStatement stmt = conn.prepareStatement("upsert into test1 values(1439853462,'qa9',8.27,1439853462)");
+        PreparedStatement stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853462,'qa9',8.27,1439853462)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853461,'qa9',8.27,1439853362)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853461,'qa9',8.27,1439853362)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853461,'qa9',5.27,1439853461)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853461,'qa9',5.27,1439853461)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853451,'qa9',4.27,1439853451)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853451,'qa9',4.27,1439853451)");
         stmt.execute();
         conn.commit();
         conn.close();
@@ -476,7 +463,7 @@ public class GroupByIT extends BaseQueryIT {
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 40));
         conn = DriverManager.getConnection(getUrl(), props);
         ResultSet rs;
-        stmt = conn.prepareStatement("select \"time\"/10 as tm, hostname, avg(usage) from test1 group by hostname, tm");
+        stmt = conn.prepareStatement("select \"time\"/10 as tm, hostname, avg(usage) from " + tableName + " group by hostname, tm");
         rs = stmt.executeQuery();
         assertTrue(rs.next());
         assertEquals(143985345, rs.getInt(1));
@@ -492,19 +479,19 @@ public class GroupByIT extends BaseQueryIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 10));
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String ddl = "create table test1(\"time\" integer not null, hostname varchar not null,usage float,period integer constraint pk PRIMARY KEY(\"time\", hostname))";
+        String ddl = "create table " + tableName + "(\"time\" integer not null, hostname varchar not null,usage float,period integer constraint pk PRIMARY KEY(\"time\", hostname))";
         conn.createStatement().execute(ddl);
         conn.close();
 
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
         conn = DriverManager.getConnection(getUrl(), props);
-        PreparedStatement stmt = conn.prepareStatement("upsert into test1 values(1439853462,'qa9',8.27,1439853462)");
+        PreparedStatement stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853462,'qa9',8.27,1439853462)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853461,'qa9',8.27,1439853362)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853461,'qa9',8.27,1439853362)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853461,'qa9',5.27,1439853461)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853461,'qa9',5.27,1439853461)");
         stmt.execute();
-        stmt = conn.prepareStatement("upsert into test1 values(1439853451,'qa9',4.27,1439853451)");
+        stmt = conn.prepareStatement("upsert into " + tableName + " values(1439853451,'qa9',4.27,1439853451)");
         stmt.execute();
         conn.commit();
         conn.close();
@@ -512,7 +499,7 @@ public class GroupByIT extends BaseQueryIT {
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 40));
         conn = DriverManager.getConnection(getUrl(), props);
         ResultSet rs;
-        stmt = conn.prepareStatement("select period/10 as tm, hostname, avg(usage) from test1 group by hostname, tm");
+        stmt = conn.prepareStatement("select period/10 as tm, hostname, avg(usage) from " + tableName + " group by hostname, tm");
         rs = stmt.executeQuery();
         assertTrue(rs.next());
         assertEquals(143985345, rs.getInt(1));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/MutableQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MutableQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MutableQueryIT.java
index da36288..50153bb 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MutableQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MutableQueryIT.java
@@ -39,18 +39,14 @@ import java.sql.ResultSet;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 public class MutableQueryIT extends BaseQueryIT {
     
@@ -66,16 +62,8 @@ public class MutableQueryIT extends BaseQueryIT {
         return testCases;
     }
     
-    @BeforeClass
-    @Shadower(classBeingShadowed = BaseQueryIT.class)
-    public static void doSetup() throws Exception {
-        Map<String,String> props = Maps.newHashMapWithExpectedSize(3);
-        props.put(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, Boolean.TRUE.toString());
-        BaseQueryIT.doSetup(props);
-    }
-
     public MutableQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, true);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/NotQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NotQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NotQueryIT.java
index 036d278..70a15c7 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NotQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NotQueryIT.java
@@ -53,7 +53,7 @@ import com.google.common.primitives.Floats;
 public class NotQueryIT extends BaseQueryIT {
 
     public NotQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Parameters(name="NotQueryIT_{index}") // name is used by failsafe as file name in reports

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/PointInTimeQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PointInTimeQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PointInTimeQueryIT.java
index bb1eabe..d3d19ee 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PointInTimeQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PointInTimeQueryIT.java
@@ -25,44 +25,33 @@ import static org.junit.Assert.fail;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
-import java.util.Map;
 import java.util.Properties;
 
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.SequenceNotFoundException;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
-
 public class PointInTimeQueryIT extends BaseQueryIT {
 
     public PointInTimeQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, true);
     }
 
-    @BeforeClass
-    @Shadower(classBeingShadowed = BaseQueryIT.class)
-    public static void doSetup() throws Exception {
-        Map<String,String> props = Maps.newHashMapWithExpectedSize(3);
-        props.put(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, Boolean.TRUE.toString());
-        BaseQueryIT.doSetup(props);
-    }
-    
     @Test
     public void testPointInTimeSequence() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn;
         ResultSet rs;
+        
+        String seqName = generateUniqueName();
 
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+5));
         conn = DriverManager.getConnection(getUrl(), props);
-        conn.createStatement().execute("CREATE SEQUENCE s");
+        conn.createStatement().execute("CREATE SEQUENCE " + seqName + "");
         
         try {
-            conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+            conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
             fail();
         } catch (SequenceNotFoundException e) {
             conn.close();
@@ -70,22 +59,22 @@ public class PointInTimeQueryIT extends BaseQueryIT {
         
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+10));
         conn = DriverManager.getConnection(getUrl(), props);
-        rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+        rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
         assertTrue(rs.next());
         assertEquals(1, rs.getInt(1));
         conn.close();
         
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+7));
         conn = DriverManager.getConnection(getUrl(), props);
-        rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+        rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
         assertTrue(rs.next());
         assertEquals(2, rs.getInt(1));
         conn.close();
         
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+15));
         conn = DriverManager.getConnection(getUrl(), props);
-        conn.createStatement().execute("DROP SEQUENCE s");
-        rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+        conn.createStatement().execute("DROP SEQUENCE " + seqName + "");
+        rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
         assertTrue(rs.next());
         assertEquals(3, rs.getInt(1));
         conn.close();
@@ -93,24 +82,24 @@ public class PointInTimeQueryIT extends BaseQueryIT {
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+20));
         conn = DriverManager.getConnection(getUrl(), props);
         try {
-            rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+            rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
             fail();
         } catch (SequenceNotFoundException e) {
             conn.close();            
         }
         
-        conn.createStatement().execute("CREATE SEQUENCE s");
+        conn.createStatement().execute("CREATE SEQUENCE " + seqName);
         conn.close();
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+25));
         conn = DriverManager.getConnection(getUrl(), props);
-        rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+        rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
         assertTrue(rs.next());
         assertEquals(1, rs.getInt(1));
         conn.close();
 
         props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts+6));
         conn = DriverManager.getConnection(getUrl(), props);
-        rs = conn.createStatement().executeQuery("SELECT next value for s FROM " + tableName + " LIMIT 1");
+        rs = conn.createStatement().executeQuery("SELECT next value for " + seqName + " FROM " + tableName + " LIMIT 1");
         assertTrue(rs.next());
         assertEquals(4, rs.getInt(1));
         conn.close();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 6b3778a..cfb2dcf 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -49,10 +49,10 @@ import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.HTableInterface;
@@ -79,24 +79,30 @@ import org.apache.phoenix.schema.types.PInteger;
 import org.apache.phoenix.schema.types.PLong;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
 import org.apache.phoenix.util.TestUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 
 public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
 	
-    @BeforeClass
-    @Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
-    public static void doSetup() throws Exception {
-        Map<String,String> props = getDefaultProps();
-        props.put(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, "true");
-        setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+    private static void createMDTestTable(Connection conn, String tableName, String extraProps) throws SQLException {
+        String ddl = "create table if not exists " + tableName +
+                "   (id char(1) primary key,\n" +
+                "    a.col1 integer,\n" +
+                "    b.col2 bigint,\n" +
+                "    b.col3 decimal,\n" +
+                "    b.col4 decimal(5),\n" +
+                "    b.col5 decimal(6,3))\n" +
+                "    a." + HConstants.VERSIONS + "=" + 1 + "," + "a." + HColumnDescriptor.DATA_BLOCK_ENCODING + "='" + DataBlockEncoding.NONE +  "'";
+        if (extraProps != null && extraProps.length() > 0) {
+            ddl += "," + extraProps;
+        }
+        conn.createStatement().execute(ddl);
+        
     }
-
+    
     @Test
     public void testTableMetadataScan() throws SQLException {
         long ts = nextTimestamp();
@@ -304,10 +310,14 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
     @Test
     public void testColumnMetadataScan() throws SQLException {
         long ts = nextTimestamp();
-        ensureTableCreated(getUrl(), MDTEST_NAME, MDTEST_NAME, ts);
         Properties props = new Properties();
-        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 2));
         Connection conn = DriverManager.getConnection(getUrl(), props);
+        createMDTestTable(conn, MDTEST_NAME, "");
+        conn.close();
+        
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
+        conn = DriverManager.getConnection(getUrl(), props);
         DatabaseMetaData dbmd = conn.getMetaData();
         ResultSet rs;
         rs = dbmd.getColumns(null, "", MDTEST_NAME, null);
@@ -489,11 +499,15 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
     @Test
     public void testPrimaryKeyMetadataScan() throws SQLException {
         long ts = nextTimestamp();
-        ensureTableCreated(getUrl(), MDTEST_NAME, MDTEST_NAME, ts);
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
+        Connection conn = DriverManager.getConnection(getUrl(), props);
+        createMDTestTable(conn, MDTEST_NAME, "");
+        conn.close();
+        
         ensureTableCreated(getUrl(), CUSTOM_ENTITY_DATA_FULL_NAME, CUSTOM_ENTITY_DATA_FULL_NAME, ts);
-        Properties props = new Properties();
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
-        Connection conn = DriverManager.getConnection(getUrl(), props);
+        conn = DriverManager.getConnection(getUrl(), props);
         DatabaseMetaData dbmd = conn.getMetaData();
         ResultSet rs;
         rs = dbmd.getPrimaryKeys(null, "", MDTEST_NAME);
@@ -596,7 +610,9 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
         Connection conn = DriverManager.getConnection(getUrl(), props);
         createGroupByTestTable(conn, GROUPBYTEST_NAME);
-        ensureTableCreated(getUrl(), MDTEST_NAME, MDTEST_NAME, ts);
+        createMDTestTable(conn, MDTEST_NAME, "");
+        conn.close();
+        
         ensureTableCreated(getUrl(), PTSDB_NAME, PTSDB_NAME, ts);
         ensureTableCreated(getUrl(), CUSTOM_ENTITY_DATA_FULL_NAME, CUSTOM_ENTITY_DATA_FULL_NAME, ts);
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
@@ -655,7 +671,7 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
     public void testCreateDropTable() throws Exception {
         long ts = nextTimestamp();
         String tenantId = getOrganizationId();
-        initATableValues(ATABLE_NAME, tenantId, getDefaultSplits(tenantId), null, ts, getUrl(), null);
+        initATableValues(ATABLE_NAME, tenantId, getDefaultSplits(tenantId), null, ts, getUrl(), HColumnDescriptor.KEEP_DELETED_CELLS + "=" + Boolean.TRUE);
         
         ensureTableCreated(getUrl(), BTABLE_NAME, BTABLE_NAME, ts-2);
         ensureTableCreated(getUrl(), PTSDB_NAME, PTSDB_NAME, ts-2);
@@ -695,7 +711,10 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
  
     @Test
     public void testCreateOnExistingTable() throws Exception {
-        PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class);
+        long ts = nextTimestamp();
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
+        PhoenixConnection pconn = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class);
         String tableName = MDTEST_NAME;
         String schemaName = MDTEST_SCHEMA_NAME;
         byte[] cfA = Bytes.toBytes(SchemaUtil.normalizeIdentifier("a"));
@@ -719,11 +738,13 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
         }
         admin.createTable(descriptor);
             
-        long ts = nextTimestamp();
-        Properties props = new Properties();
-        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
-        PhoenixConnection conn1 = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class);
-        ensureTableCreated(getUrl(), tableName, tableName, ts);
+        ts = nextTimestamp();
+        props = new Properties();
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 2));
+        props.setProperty(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, Boolean.TRUE.toString());
+        PhoenixConnection conn0 = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class);
+        createMDTestTable(conn0,tableName, "a." + HColumnDescriptor.KEEP_DELETED_CELLS + "=" + Boolean.TRUE);
+        conn0.close();
         
         descriptor = admin.getTableDescriptor(htableName);
         assertEquals(3,descriptor.getColumnFamilies().length);
@@ -745,6 +766,9 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
         assertTrue(descriptor.hasCoprocessor(ServerCachingEndpointImpl.class.getName()));
         admin.close();
          
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
+        props.setProperty(QueryServices.DEFAULT_KEEP_DELETED_CELLS_ATTRIB, Boolean.TRUE.toString());
+        PhoenixConnection conn1 = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class);
         int rowCount = 5;
         String upsert = "UPSERT INTO " + tableName + "(id,col1,col2) VALUES(?,?,?)";
         PreparedStatement ps = conn1.prepareStatement(upsert);
@@ -1125,9 +1149,11 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
     public void testDropAllKVCols() throws Exception {
         ResultSet rs;
         long ts = nextTimestamp();
-        ensureTableCreated(getUrl(), MDTEST_NAME, MDTEST_NAME, null, ts, null);
-        
-        Properties props = new Properties();
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
+        Connection conn = DriverManager.getConnection(getUrl(), props);
+        createMDTestTable(conn, MDTEST_NAME, "");
+        conn.close();
         
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 2));
         Connection conn2 = DriverManager.getConnection(getUrl(), props);
@@ -1171,9 +1197,12 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
     @Test
     public void testNewerTableDisallowed() throws Exception {
         long ts = nextTimestamp();
-        ensureTableCreated(getUrl(), ATABLE_NAME, ATABLE_NAME, null, ts, null);
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
+        Connection conn = DriverManager.getConnection(getUrl(), props);
+        conn.createStatement().execute("create table " + ATABLE_NAME + "(k varchar primary key, x_integer INTEGER, y_integer INTEGER)");
+        conn.close();
         
-        Properties props = new Properties();
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 5));
         Connection conn5 = DriverManager.getConnection(getUrl(), props);
         conn5.createStatement().executeUpdate("ALTER TABLE " + ATABLE_NAME + " DROP COLUMN x_integer");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
index 1084f14..a06c961 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
@@ -63,7 +63,7 @@ import org.junit.Test;
 public class QueryIT extends BaseQueryIT {
     
     public QueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/it/java/org/apache/phoenix/end2end/ScanQueryIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ScanQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ScanQueryIT.java
index b0ce8cd..4f9eb86 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ScanQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ScanQueryIT.java
@@ -63,7 +63,7 @@ public class ScanQueryIT extends BaseQueryIT {
     }
 
     public ScanQueryIT(String indexDDL, boolean mutable, boolean columnEncoded) {
-        super(indexDDL, mutable, columnEncoded);
+        super(indexDDL, mutable, columnEncoded, false);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2708e2e5/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 078c1e8..05dbc3c 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -44,7 +44,6 @@ import static org.apache.phoenix.util.TestUtil.E_VALUE;
 import static org.apache.phoenix.util.TestUtil.FUNKY_NAME;
 import static org.apache.phoenix.util.TestUtil.HBASE_DYNAMIC_COLUMNS;
 import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE;
-import static org.apache.phoenix.util.TestUtil.MDTEST_NAME;
 import static org.apache.phoenix.util.TestUtil.MULTI_CF_NAME;
 import static org.apache.phoenix.util.TestUtil.PARENTID1;
 import static org.apache.phoenix.util.TestUtil.PARENTID2;
@@ -310,14 +309,6 @@ public abstract class BaseTest {
                 "    \"1\".\"value\" integer,\n" +
                 "    \"1\".\"_blah^\" varchar)"
                 );
-        builder.put(MDTEST_NAME,"create table " + MDTEST_NAME +
-                "   (id char(1) primary key,\n" +
-                "    a.col1 integer,\n" +
-                "    b.col2 bigint,\n" +
-                "    b.col3 decimal,\n" +
-                "    b.col4 decimal(5),\n" +
-                "    b.col5 decimal(6,3))\n" +
-                "    a." + HConstants.VERSIONS + "=" + 1 + "," + "a." + HColumnDescriptor.DATA_BLOCK_ENCODING + "='" + DataBlockEncoding.NONE +  "'");
         builder.put(MULTI_CF_NAME,"create table " + MULTI_CF_NAME +
                 "   (id char(15) not null primary key,\n" +
                 "    a.unique_user_count integer,\n" +


Mime
View raw message