You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2023/09/18 06:18:49 UTC

[phoenix] branch master updated (a14551ff7a -> 48d712ca41)

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


    from a14551ff7a PHOENIX-7002 : Added log line for Stale Region Boundary Cache Exception (#1674)
     new 193b3c544b PHOENIX-6973 Add option to CREATE TABLE to skip verification of HBase table
     new 48d712ca41 PHOENIX-7036 Copy the Java version specific profiles for JVM options from HBase

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/phoenix/end2end/CreateTableIT.java  | 88 ++++++++++++++++++++++
 phoenix-core/src/main/antlr3/PhoenixSQL.g          |  6 +-
 .../org/apache/phoenix/jdbc/PhoenixStatement.java  | 26 +++++--
 .../apache/phoenix/parse/CreateTableStatement.java | 11 ++-
 .../org/apache/phoenix/parse/ParseNodeFactory.java | 54 +++++++++----
 .../org/apache/phoenix/schema/MetaDataClient.java  |  4 +-
 .../phoenix/compile/CreateTableCompilerTest.java   | 27 ++++++-
 .../phoenix/compile/PostIndexDDLCompilerTest.java  | 15 ++++
 .../phoenix/jdbc/PhoenixPreparedStatementTest.java |  1 -
 pom.xml                                            | 80 +++++++++++++++++---
 10 files changed, 270 insertions(+), 42 deletions(-)


[phoenix] 02/02: PHOENIX-7036 Copy the Java version specific profiles for JVM options from HBase

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit 48d712ca41aa8b2efe353c3f31618b14f95a4d18
Author: Istvan Toth <st...@apache.org>
AuthorDate: Fri Sep 15 14:35:54 2023 +0200

    PHOENIX-7036 Copy the Java version specific profiles for JVM options from HBase
---
 pom.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 71 insertions(+), 9 deletions(-)

diff --git a/pom.xml b/pom.xml
index f3e5f35155..21c134179a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,6 +85,10 @@
     <hbase-2.4.runtime.version>2.4.16</hbase-2.4.runtime.version>
     <hbase-2.5.runtime.version>2.5.3-hadoop3</hbase-2.5.runtime.version>
 
+    <compileSource>1.8</compileSource>
+    <maven.compiler.source>${compileSource}</maven.compiler.source>
+    <maven.compiler.target>${compileSource}</maven.compiler.target>
+
     <!-- General Properties -->
     <antlr-input.dir>src/main/antlr3</antlr-input.dir>
     <antlr-output.dir>target/generated-sources/antlr3</antlr-output.dir>
@@ -156,6 +160,41 @@
     <!-- Empty argument when code coverage is deactivated -->
     <jacocoArgLine></jacocoArgLine>
 
+    <!-- JVM version dependent JVM options for running tests. Keep mostly in sync with HBase-->
+    <surefire.Xmx>2200m</surefire.Xmx>
+
+    <phoenix-surefire.argLine>-enableassertions -Xmx${surefire.Xmx}
+      -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true
+      -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true
+      -Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced
+      -Dio.netty.eventLoopThreads=3 -Duser.timezone="America/Los_Angeles"
+      -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/
+      "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}"
+    </phoenix-surefire.argLine>
+    <phoenix-surefire.jdk8.tuning.flags>
+        -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC
+        -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled
+        -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68
+    </phoenix-surefire.jdk8.tuning.flags>
+    <phoenix-surefire.jdk11.flags>-Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true
+      --add-modules jdk.unsupported
+      --add-opens java.base/java.nio=ALL-UNNAMED
+      --add-opens java.base/sun.nio.ch=ALL-UNNAMED
+      --add-opens java.base/java.lang=ALL-UNNAMED
+      --add-opens java.base/jdk.internal.ref=ALL-UNNAMED
+      --add-opens java.base/java.lang.reflect=ALL-UNNAMED
+      --add-opens java.base/java.util=ALL-UNNAMED
+      --add-opens java.base/java.util.concurrent=ALL-UNNAMED
+      --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
+      --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED</phoenix-surefire.jdk11.flags>
+    <phoenix-surefire.jdk11.tuning.flags>
+        ${phoenix-surefire.jdk8.tuning.flags}
+    </phoenix-surefire.jdk11.tuning.flags>
+    <phoenix-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</phoenix-surefire.jdk17.flags>
+    <phoenix-surefire.jdk17.tuning.flags></phoenix-surefire.jdk17.tuning.flags>
+    <!-- Surefire argLine defaults for Linux + JDK8 -->
+    <argLine>${phoenix-surefire.argLine} ${phoenix-surefire.jdk8.tuning.flags} @{jacocoArgLine}</argLine>
+
     <!-- Set default encoding so multi-byte tests work correctly on the Mac -->
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -192,10 +231,6 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <configuration>
-            <source>1.8</source>
-            <target>1.8</target>
-          </configuration>
         </plugin>
         <plugin>
           <groupId>org.antlr</groupId>
@@ -328,7 +363,6 @@
               <id>ParallelStatsEnabledTest</id>
               <configuration>
                 <reuseForks>true</reuseForks>
-                <argLine>@{jacocoArgLine} -Duser.timezone="America/Los_Angeles" -Xmx3000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccup [...]
                 <groups>org.apache.phoenix.end2end.ParallelStatsEnabledTest</groups>
               </configuration>
               <goals>
@@ -340,7 +374,6 @@
               <id>ParallelStatsDisabledTest</id>
               <configuration>
                 <reuseForks>true</reuseForks>
-                <argLine>@{jacocoArgLine} -Duser.timezone="America/Los_Angeles" -Xmx3000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccup [...]
                 <groups>org.apache.phoenix.end2end.ParallelStatsDisabledTest</groups>
               </configuration>
               <goals>
@@ -352,7 +385,6 @@
               <id>NeedTheirOwnClusterTests</id>
               <configuration>
                  <reuseForks>false</reuseForks>
-                 <argLine>@{jacocoArgLine} -Duser.timezone="America/Los_Angeles" -enableassertions -Xmx3000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX [...]
                  <groups>org.apache.phoenix.end2end.NeedsOwnMiniClusterTest</groups>
               </configuration>
               <goals>
@@ -574,8 +606,6 @@
         <configuration>
           <forkCount>${numForkedUT}</forkCount>
           <reuseForks>true</reuseForks>
-          <argLine>@{jacocoArgLine} -enableassertions -Xmx2250m -Duser.timezone="America/Los_Angeles"
-            -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine>
           <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
           <shutdown>exit</shutdown>
           <trimStackTrace>false</trimStackTrace>
@@ -1816,6 +1846,38 @@
         <protoc.arch>osx-x86_64</protoc.arch>
       </properties>
     </profile>
+    <profile>
+      <id>build-with-jdk8</id>
+      <activation>
+        <jdk>[1.8,11)</jdk>
+      </activation>
+    </profile>
+    <!-- See PHOENIX-6997 when building with with Java9+ -->
+    <profile>
+      <id>build-with-jdk11</id>
+      <activation>
+        <jdk>[11,17)</jdk>
+      </activation>
+      <properties>
+        <argLine>${phoenix-surefire.jdk11.flags}
+          ${phoenix-surefire.jdk11.tuning.flags}
+          ${phoenix-surefire.argLine}
+          @{jacocoArgLine}</argLine>
+      </properties>
+    </profile>
+    <profile>
+      <id>build-with-jdk17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
+      <properties>
+        <argLine>${phoenix-surefire.jdk11.flags}
+          ${phoenix-surefire.jdk17.flags}
+          ${phoenix-surefire.jdk17.tuning.flags}
+          ${phoenix-surefire.argLine}
+          @{jacocoArgLine}</argLine>
+      </properties>
+    </profile>
   </profiles>
   <reporting>
     <plugins>


[phoenix] 01/02: PHOENIX-6973 Add option to CREATE TABLE to skip verification of HBase table

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit 193b3c544be3a3b24ad417dbd8154cc260fb6cce
Author: Tamas Payer <tp...@cloudera.com>
AuthorDate: Wed Jun 7 10:03:39 2023 +0200

    PHOENIX-6973 Add option to CREATE TABLE to skip verification of HBase table
---
 .../org/apache/phoenix/end2end/CreateTableIT.java  | 88 ++++++++++++++++++++++
 phoenix-core/src/main/antlr3/PhoenixSQL.g          |  6 +-
 .../org/apache/phoenix/jdbc/PhoenixStatement.java  | 26 +++++--
 .../apache/phoenix/parse/CreateTableStatement.java | 11 ++-
 .../org/apache/phoenix/parse/ParseNodeFactory.java | 54 +++++++++----
 .../org/apache/phoenix/schema/MetaDataClient.java  |  4 +-
 .../phoenix/compile/CreateTableCompilerTest.java   | 27 ++++++-
 .../phoenix/compile/PostIndexDDLCompilerTest.java  | 15 ++++
 .../phoenix/jdbc/PhoenixPreparedStatementTest.java |  1 -
 9 files changed, 199 insertions(+), 33 deletions(-)

diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
index ab37d5794f..bf9c9cde86 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
@@ -41,19 +41,28 @@ import java.util.Properties;
 import java.util.UUID;
 
 import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.KeepDeletedCells;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
 import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
 import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory;
 import org.apache.hadoop.hbase.regionserver.BloomType;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.mapreduce.index.IndexUpgradeTool;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.query.QueryServices;
@@ -67,6 +76,7 @@ import org.apache.phoenix.schema.PTableType;
 import org.apache.phoenix.schema.SchemaNotFoundException;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
+import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -1611,6 +1621,84 @@ public class CreateTableIT extends ParallelStatsDisabledIT {
         }
     }
 
+    @Test
+    public void testCreateTableWithNoVerify() throws SQLException, IOException, InterruptedException {
+        final String tableName = SchemaUtil.getTableName(generateUniqueName(), generateUniqueName());
+        final byte[] tableBytes = tableName.getBytes();
+        final byte[] familyName = Bytes.toBytes(SchemaUtil.normalizeIdentifier("0"));
+        final byte[][] splits = new byte[][] {Bytes.toBytes(20), Bytes.toBytes(30)};
+
+        try (Admin admin = driver.getConnectionQueryServices(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).getAdmin()) {
+            admin.createTable(TableDescriptorBuilder.newBuilder(TableName.valueOf(tableBytes))
+                    .addColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(familyName)
+                            .setKeepDeletedCells(KeepDeletedCells.TRUE).build())
+                    .build(), splits);
+        }
+
+        final byte[] uintCol = Bytes.toBytes("UINT_COL");
+        final byte[] ulongCol = Bytes.toBytes("ULONG_COL");
+        final byte[] key_1 = ByteUtil.concat(Bytes.toBytes(20), Bytes.toBytes(200L), Bytes.toBytes("b"));
+        final byte[] key_2 = ByteUtil.concat(Bytes.toBytes(40), Bytes.toBytes(400L), Bytes.toBytes("d"));
+        final byte[] emptyColumnQualifier = Bytes.toBytes("_0");
+
+        ConnectionQueryServices services = driver.getConnectionQueryServices(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES));
+        try (Table hTable = services.getTable(tableBytes)) {
+            // Insert rows using standard HBase mechanism with standard HBase "types"
+            List<Row> mutations = new ArrayList<>();
+
+            Put put = new Put(key_1);
+            put.addColumn(familyName, uintCol, HConstants.LATEST_TIMESTAMP, Bytes.toBytes(5000));
+            put.addColumn(familyName, ulongCol, HConstants.LATEST_TIMESTAMP, Bytes.toBytes(50000L));
+            mutations.add(put);
+
+            put = new Put(key_2);
+            put.addColumn(familyName, uintCol, HConstants.LATEST_TIMESTAMP, Bytes.toBytes(4000));
+            put.addColumn(familyName, ulongCol, HConstants.LATEST_TIMESTAMP, Bytes.toBytes(40000L));
+            mutations.add(put);
+
+            hTable.batch(mutations, null);
+
+            Result result = hTable.get(new Get(key_1));
+            assertFalse(result.isEmpty());
+
+            result = hTable.get(new Get(key_2));
+            assertFalse(result.isEmpty());
+        }
+
+        String ddl = "create table " + tableName +
+                "   (uint_key unsigned_int not null," +
+                "    ulong_key unsigned_long not null," +
+                "    string_key varchar not null,\n" +
+                "    uint_col unsigned_int," +
+                "    ulong_col unsigned_long" +
+                "    CONSTRAINT pk PRIMARY KEY (uint_key, ulong_key, string_key)) noverify COLUMN_ENCODED_BYTES=NONE";
+
+        try (Connection conn = DriverManager.getConnection(url)) {
+            conn.createStatement().execute(ddl);
+        }
+
+        try (Table hTable = services.getTable(tableBytes)) {
+            Result result = hTable.get(new Get(key_1));
+
+            byte[] value = result.getValue(familyName, uintCol);
+            assertEquals(5000, Bytes.toInt(value));
+            value = result.getValue(familyName, ulongCol);
+            assertEquals(50000L, Bytes.toLong(value));
+
+            value = result.getValue(familyName, emptyColumnQualifier);
+            assertNull(value);
+
+            result = hTable.get(new Get(key_2));
+            value = result.getValue(familyName, uintCol);
+            assertEquals(4000, Bytes.toInt(value));
+            value = result.getValue(familyName, ulongCol);
+            assertEquals(40000L, Bytes.toLong(value));
+
+            value = result.getValue(familyName, emptyColumnQualifier);
+            assertNull(value);
+        }
+    }
+
     public static long verifyLastDDLTimestamp(String tableFullName, long startTS, Connection conn) throws SQLException {
         long endTS = EnvironmentEdgeManager.currentTimeMillis();
         //Now try the PTable API
diff --git a/phoenix-core/src/main/antlr3/PhoenixSQL.g b/phoenix-core/src/main/antlr3/PhoenixSQL.g
index a8cbb71085..54e5a564f4 100644
--- a/phoenix-core/src/main/antlr3/PhoenixSQL.g
+++ b/phoenix-core/src/main/antlr3/PhoenixSQL.g
@@ -153,6 +153,7 @@ tokens
     SHOW = 'show';
     UNCOVERED = 'uncovered';
     REGIONS = 'regions';
+    NOVERIFY = 'noverify';
 }
 
 
@@ -286,7 +287,7 @@ package org.apache.phoenix.parse;
     public void resetBindCount() {
         anonBindNum = 0;
     }
-    
+
     public String nextBind() {
         return Integer.toString(++anonBindNum);
     }
@@ -468,10 +469,11 @@ explain_node returns [BindableStatement ret]
 create_table_node returns [CreateTableStatement ret]
     :   CREATE (im=IMMUTABLE)? TABLE (IF NOT ex=EXISTS)? t=from_table_name 
         (LPAREN c=column_defs (pk=pk_constraint)? RPAREN)
+        (noverify=NOVERIFY)?
         (p=fam_properties)?
         (SPLIT ON s=value_expression_list)?
         (COLUMN_QUALIFIER_COUNTER LPAREN cqc=initializiation_list RPAREN)?
-        {ret = factory.createTable(t, p, c, pk, s, PTableType.TABLE, ex!=null, null, null, getBindCount(), im!=null ? true : null,  cqc); }
+        {ret = factory.createTable(t, p, c, pk, s, PTableType.TABLE, ex!=null, null, null, getBindCount(), im!=null ? true : null, cqc, noverify!=null); }
     ;
    
 // Parse a create schema statement.
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
index 8f72c7787c..d73f1cbc15 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
@@ -272,7 +272,7 @@ public class PhoenixStatement implements PhoenixMonitoredStatement, SQLCloseable
         public String toString() {
             return toString;
         }
-    };
+    }
 
     protected final PhoenixConnection connection;
     private static final int NO_UPDATE = -1;
@@ -1048,8 +1048,10 @@ public class PhoenixStatement implements PhoenixMonitoredStatement, SQLCloseable
         ExecutableCreateTableStatement(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columnDefs,
                                        PrimaryKeyConstraint pkConstraint, List<ParseNode> splitNodes, PTableType tableType, boolean ifNotExists,
                                        TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows,
-                                       Map<String, Integer> familyCounters) {
-            super(tableName, props, columnDefs, pkConstraint, splitNodes, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, familyCounters);
+                                       Map<String, Integer> familyCounters, boolean noVerify) {
+            super(tableName, props, columnDefs, pkConstraint, splitNodes, tableType, ifNotExists,
+                    baseTableName, tableTypeIdNode, bindCount, immutableRows, familyCounters,
+                    noVerify);
         }
 
         @SuppressWarnings("unchecked")
@@ -1821,14 +1823,22 @@ public class PhoenixStatement implements PhoenixMonitoredStatement, SQLCloseable
         }
 
         @Override
-        public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits, PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows, Map<String, Integer> cqCounters) {
-            return new ExecutableCreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters);
+        public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits,
+                                                PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows,
+                                                Map<String, Integer> cqCounters, boolean noVerify) {
+            return new ExecutableCreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters, noVerify);
+        }
+
+        @Override
+        public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits,
+                                                PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows, Map<String, Integer> cqCounters) {
+            return createTable(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters, false);
         }
 
         @Override
-        public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint,
-                List<ParseNode> splits, PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows) {
-            return new ExecutableCreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, null);
+        public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits,
+                                                PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows) {
+            return createTable(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, null);
         }
 
         @Override
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/parse/CreateTableStatement.java b/phoenix-core/src/main/java/org/apache/phoenix/parse/CreateTableStatement.java
index 2d9ea13e6e..37376c985e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/CreateTableStatement.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/CreateTableStatement.java
@@ -43,6 +43,7 @@ public class CreateTableStatement extends MutableStatement {
     // TODO change this to boolean at the next major release and remove TableProperty.IMMUTABLE_ROWS and QueryServiceOptions.IMMUTABLE_ROWS_ATTRIB
     private final Boolean immutableRows;
     private final Map<String, Integer> familyCQCounters;
+    private final boolean noVerify;
     
     public CreateTableStatement(CreateTableStatement createTable, List<ColumnDef> columns) {
         this.tableName = createTable.tableName;
@@ -57,6 +58,7 @@ public class CreateTableStatement extends MutableStatement {
         this.whereClause = createTable.whereClause;
         this.immutableRows = createTable.immutableRows;
         this.familyCQCounters = createTable.familyCQCounters;
+        this.noVerify = createTable.noVerify;
     }
 
     public CreateTableStatement(CreateTableStatement createTable, PrimaryKeyConstraint pkConstraint,
@@ -73,6 +75,7 @@ public class CreateTableStatement extends MutableStatement {
         this.whereClause = createTable.whereClause;
         this.immutableRows = createTable.immutableRows;
         this.familyCQCounters = createTable.familyCQCounters;
+        this.noVerify = createTable.noVerify;
     }
 
     public CreateTableStatement(CreateTableStatement createTable, ListMultimap<String,Pair<String,Object>>  props, List<ColumnDef> columns) {
@@ -88,12 +91,13 @@ public class CreateTableStatement extends MutableStatement {
         this.whereClause = createTable.whereClause;
         this.immutableRows = createTable.immutableRows;
         this.familyCQCounters = createTable.familyCQCounters;
+        this.noVerify = createTable.noVerify;
     }
 
     protected CreateTableStatement(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint,
                                    List<ParseNode> splitNodes, PTableType tableType, boolean ifNotExists,
                                    TableName baseTableName, ParseNode whereClause, int bindCount, Boolean immutableRows,
-                                   Map<String, Integer> familyCounters) {
+                                   Map<String, Integer> familyCounters, boolean noVerify) {
         this.tableName = tableName;
         this.props = props == null ? ImmutableListMultimap.<String,Pair<String,Object>>of() : props;
         this.tableType = PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA.equals(tableName.getSchemaName()) ? PTableType.SYSTEM : tableType;
@@ -106,6 +110,7 @@ public class CreateTableStatement extends MutableStatement {
         this.whereClause = whereClause;
         this.immutableRows = immutableRows;
         this.familyCQCounters = familyCounters;
+        this.noVerify = noVerify;
     }
 
     public ParseNode getWhereClause() {
@@ -156,4 +161,8 @@ public class CreateTableStatement extends MutableStatement {
     public Map<String, Integer> getFamilyCQCounters() {
         return familyCQCounters;
     }
+
+    public boolean isNoVerify() {
+        return noVerify;
+    }
 }
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
index 660598b424..12f806020f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
@@ -331,12 +331,34 @@ public class ParseNodeFactory {
         return new IndexKeyConstraint(parseNodeAndSortOrder);
     }
 
-    public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits, PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows, Map<String, Integer> cqCounters) {
-        return new CreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters);
-    }
-
-    public CreateTableStatement createTable(TableName tableName, ListMultimap<String,Pair<String,Object>> props, List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits, PTableType tableType, boolean ifNotExists, TableName baseTableName, ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows) {
-        return new CreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, null);
+    public CreateTableStatement createTable(
+            TableName tableName, ListMultimap<String,Pair<String,Object>> props,
+            List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint,
+            List<ParseNode> splits, PTableType tableType, boolean ifNotExists,
+            TableName baseTableName, ParseNode tableTypeIdNode, int bindCount,
+            Boolean immutableRows, Map<String, Integer> cqCounters, boolean noVerify) {
+        return new CreateTableStatement(tableName, props, columns, pkConstraint, splits, tableType,
+                ifNotExists, baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters,
+                noVerify);
+    }
+
+    public CreateTableStatement createTable(
+            TableName tableName, ListMultimap<String,Pair<String,Object>> props,
+            List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits,
+            PTableType tableType, boolean ifNotExists, TableName baseTableName,
+            ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows,
+            Map<String, Integer> cqCounters) {
+        return createTable(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists,
+                baseTableName, tableTypeIdNode, bindCount, immutableRows, cqCounters, false);
+    }
+
+    public CreateTableStatement createTable(
+            TableName tableName, ListMultimap<String,Pair<String,Object>> props,
+            List<ColumnDef> columns, PrimaryKeyConstraint pkConstraint, List<ParseNode> splits,
+            PTableType tableType, boolean ifNotExists, TableName baseTableName,
+            ParseNode tableTypeIdNode, int bindCount, Boolean immutableRows) {
+        return createTable(tableName, props, columns, pkConstraint, splits, tableType, ifNotExists,
+                baseTableName, tableTypeIdNode, bindCount, immutableRows, null, false);
     }
 
     public CreateSchemaStatement createSchema(String schemaName, boolean ifNotExists) {
@@ -445,15 +467,15 @@ public class ParseNodeFactory {
     }
     
     public NamedTableNode namedTable(String alias, TableName name, List<ColumnDef> dyn_columns, LiteralParseNode tableSampleNode) {
-    	Double tableSamplingRate;
-    	if(tableSampleNode==null||tableSampleNode.getValue()==null){
-    		tableSamplingRate=ConcreteTableNode.DEFAULT_TABLE_SAMPLING_RATE;
-    	}else if(tableSampleNode.getValue() instanceof Integer){
-    		tableSamplingRate=(double)((int)tableSampleNode.getValue());
-    	}else{
-    		tableSamplingRate=((BigDecimal) tableSampleNode.getValue()).doubleValue();
-    	}
-    	return new NamedTableNode(alias, name, dyn_columns, tableSamplingRate);
+        Double tableSamplingRate;
+        if (tableSampleNode == null || tableSampleNode.getValue() == null) {
+            tableSamplingRate = ConcreteTableNode.DEFAULT_TABLE_SAMPLING_RATE;
+        } else if (tableSampleNode.getValue() instanceof Integer) {
+            tableSamplingRate = (double)((int)tableSampleNode.getValue());
+        } else {
+            tableSamplingRate=((BigDecimal) tableSampleNode.getValue()).doubleValue();
+        }
+        return new NamedTableNode(alias, name, dyn_columns, tableSamplingRate);
     }
 
     public BindTableNode bindTable(String alias, TableName name) {
@@ -519,7 +541,7 @@ public class ParseNodeFactory {
         args.addAll(valueNodes);
 
         BuiltInFunctionInfo info = getInfo(name, args);
-        if(info==null) {
+        if (info == null) {
             return new UDFParseNode(name,args,info);
         }
         Constructor<? extends FunctionParseNode> ctor = info.getNodeCtor();
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 38ae68b34a..4fbee3cc24 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -290,7 +290,6 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Maps;
 import org.apache.phoenix.thirdparty.com.google.common.collect.Sets;
 import org.apache.phoenix.thirdparty.com.google.common.primitives.Ints;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
 
 public class MetaDataClient {
     private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataClient.class);
@@ -1022,7 +1021,8 @@ public class MetaDataClient {
         }
         table = createTableInternal(statement, splits, parent, viewStatement, viewType, viewIndexIdType, viewColumnConstants, isViewColumnReferenced, false, null, null, tableProps, commonFamilyProps);
 
-        if (table == null || table.getType() == PTableType.VIEW /*|| table.isTransactional()*/) {
+        if (table == null || table.getType() == PTableType.VIEW
+                || statement.isNoVerify() /*|| table.isTransactional()*/) {
             return new MutationState(0, 0, connection);
         }
         // Hack to get around the case when an SCN is specified on the connection.
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/compile/CreateTableCompilerTest.java b/phoenix-core/src/test/java/org/apache/phoenix/compile/CreateTableCompilerTest.java
index ed907c3938..54e52f2332 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/compile/CreateTableCompilerTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/compile/CreateTableCompilerTest.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.compile;
 
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.sql.DriverManager;
@@ -26,6 +28,8 @@ import java.sql.SQLException;
 import java.util.Properties;
 
 import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.parse.CreateTableStatement;
+import org.apache.phoenix.parse.SQLParser;
 import org.apache.phoenix.query.BaseConnectionlessQueryTest;
 import org.apache.phoenix.schema.ColumnAlreadyExistsException;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -35,13 +39,30 @@ public class CreateTableCompilerTest extends BaseConnectionlessQueryTest {
     @Test
     public void testCreateTableWithDuplicateColumns() throws SQLException {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-        PhoenixConnection conn = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class);
-        String ddl = "CREATE TABLE T (ID INTEGER PRIMARY KEY, DUPE INTEGER, DUPE INTEGER)";
-        try {
+        try (PhoenixConnection conn = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class)) {
+            String ddl = "CREATE TABLE T (ID INTEGER PRIMARY KEY, DUPE INTEGER, DUPE INTEGER)";
             conn.createStatement().execute(ddl);
             fail();
         } catch (ColumnAlreadyExistsException e) {
             assertEquals("DUPE", e.getColumnName());
         }
     }
+
+    @Test
+    public void testCreateTableWithNoVerify() throws SQLException {
+        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+        try (PhoenixConnection conn = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class)) {
+            String ddl = "CREATE TABLE T (ID INTEGER PRIMARY KEY, A INTEGER, B INTEGER) NOVERIFY";
+            boolean result = conn.createStatement().execute(ddl);
+            assertFalse(result);
+        }
+    }
+
+    @Test
+    public void testCreateTableWithNoVerifyValidateStmt() throws SQLException {
+        String ddl = "CREATE TABLE A (K VARCHAR PRIMARY KEY DESC) NOVERIFY";
+        CreateTableStatement stmt = (CreateTableStatement)new SQLParser((ddl)).parseStatement();
+
+        assertTrue(stmt.isNoVerify());
+    }
 }
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java b/phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java
index 9df2fec5d1..9e99a7eb96 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java
@@ -23,6 +23,7 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
 
+import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.query.BaseConnectionlessQueryTest;
@@ -60,6 +61,20 @@ public class PostIndexDDLCompilerTest extends BaseConnectionlessQueryTest {
         }
     }
 
+    @Test
+    public void testCreateTableWithNoVerify() throws SQLException {
+        String ddl = "CREATE TABLE A (K VARCHAR PRIMARY KEY DESC) NOVERIFY";
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            PhoenixStatement stmt = conn.createStatement().unwrap(PhoenixStatement.class);
+            MutationPlan plan = stmt.compileMutation(ddl);
+            MutationState state = plan.execute();
+
+            assertEquals("CREATE TABLE\n", plan.getExplainPlan().toString());
+            assertEquals(0, state.getMaxSize());
+            assertEquals(0, state.getMaxSizeBytes());
+        }
+    }
+
     private void setupTables(Connection conn) throws SQLException {
         conn.createStatement().execute("CREATE TABLE T (k VARCHAR NOT NULL PRIMARY KEY, v1 CHAR(15), v2 VARCHAR)");
         conn.createStatement().execute("CREATE INDEX IDX ON T(v1, v2)");
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java
index 616e3a029a..5d1d09922c 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java
@@ -25,7 +25,6 @@ import java.util.Properties;
 
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.query.BaseConnectionlessQueryTest;
-import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.query.QueryServicesOptions;
 import org.junit.Test;