You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kg...@apache.org on 2018/07/30 08:58:06 UTC

[2/2] hive git commit: Revert "HIVE-20185: Backport HIVE-20111 to branch-3 (Daniel Voros via Zoltan Haindrich)"

Revert "HIVE-20185: Backport HIVE-20111 to branch-3 (Daniel Voros via Zoltan Haindrich)"

This reverts commit c7386550e8e3815845006d6b9674363bb591d76a.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/7a41f0b5
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/7a41f0b5
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/7a41f0b5

Branch: refs/heads/branch-3
Commit: 7a41f0b5237ed40c02d551594c59ac13fe460b12
Parents: c738655
Author: Zoltan Haindrich <ki...@rxd.hu>
Authored: Mon Jul 30 10:57:19 2018 +0200
Committer: Zoltan Haindrich <ki...@rxd.hu>
Committed: Mon Jul 30 10:57:19 2018 +0200

----------------------------------------------------------------------
 .../apache/hadoop/hive/hbase/HBaseMetaHook.java |  56 ++++++++-------
 .../src/test/queries/negative/cascade_dbdrop.q  |   4 +-
 .../generatehfiles_require_family_path.q        |   5 +-
 .../src/test/queries/negative/hbase_ddl.q       |   4 +-
 .../test/queries/positive/external_table_ppd.q  |   5 +-
 .../test/queries/positive/hbase_binary_binary.q |   5 +-
 .../queries/positive/hbase_binary_map_queries.q |  13 ++--
 .../positive/hbase_binary_map_queries_prefix.q  |   9 ++-
 .../positive/hbase_binary_storage_queries.q     |  12 ++--
 .../test/queries/positive/hbase_custom_key.q    |   5 +-
 .../test/queries/positive/hbase_custom_key2.q   |   5 +-
 .../test/queries/positive/hbase_custom_key3.q   |   5 +-
 .../src/test/queries/positive/hbase_ddl.q       |   4 +-
 .../queries/positive/hbase_decimal_decimal.q    |   5 +-
 .../test/queries/positive/hbase_handler_bulk.q  |  11 +--
 .../src/test/queries/positive/hbase_joins.q     |  25 +++----
 .../queries/positive/hbase_null_first_col.q     |   5 +-
 .../src/test/queries/positive/hbase_ppd_join.q  |   8 +--
 .../test/queries/positive/hbase_ppd_key_range.q |   5 +-
 .../src/test/queries/positive/hbase_pushdown.q  |   5 +-
 .../src/test/queries/positive/hbase_queries.q   |  54 ++++++---------
 .../test/queries/positive/hbase_scan_params.q   |   5 +-
 .../hbase_single_sourced_multi_insert.q         |   5 +-
 .../src/test/queries/positive/hbase_timestamp.q |  20 +++---
 .../queries/positive/hbase_timestamp_format.q   |   4 +-
 .../src/test/queries/positive/hbase_viewjoins.q |  10 ++-
 .../src/test/queries/positive/hbasestats.q      |   5 +-
 .../src/test/queries/positive/ppd_key_ranges.q  |   5 +-
 .../test/results/negative/cascade_dbdrop.q.out  |   8 +--
 .../generatehfiles_require_family_path.q.out    |   6 +-
 .../src/test/results/negative/hbase_ddl.q.out   |   8 +--
 .../results/positive/external_table_ppd.q.out   |  14 ++--
 .../results/positive/hbase_binary_binary.q.out  |   6 +-
 .../positive/hbase_binary_map_queries.q.out     |  22 +++---
 .../hbase_binary_map_queries_prefix.q.out       |  14 ++--
 .../positive/hbase_binary_storage_queries.q.out |  28 +++-----
 .../results/positive/hbase_custom_key.q.out     |   6 +-
 .../results/positive/hbase_custom_key2.q.out    |   6 +-
 .../results/positive/hbase_custom_key3.q.out    |   6 +-
 .../src/test/results/positive/hbase_ddl.q.out   |  16 ++---
 .../positive/hbase_decimal_decimal.q.out        | Bin 1872 -> 1758 bytes
 .../results/positive/hbase_handler_bulk.q.out   |  16 ++---
 .../src/test/results/positive/hbase_joins.q.out |  30 +++-----
 .../results/positive/hbase_null_first_col.q.out |   6 +-
 .../test/results/positive/hbase_ppd_join.q.out  |  12 ++--
 .../results/positive/hbase_ppd_key_range.q.out  |   6 +-
 .../test/results/positive/hbase_pushdown.q.out  |   6 +-
 .../test/results/positive/hbase_queries.q.out   |  68 +++++++------------
 .../results/positive/hbase_scan_params.q.out    |   6 +-
 .../hbase_single_sourced_multi_insert.q.out     |   6 +-
 .../test/results/positive/hbase_timestamp.q.out |  24 +++----
 .../positive/hbase_timestamp_format.q.out       |   8 +--
 .../test/results/positive/hbase_viewjoins.q.out |  20 +++---
 .../src/test/results/positive/hbasestats.q.out  |  26 ++-----
 .../test/results/positive/ppd_key_ranges.q.out  |   6 +-
 55 files changed, 278 insertions(+), 406 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseMetaHook.java
----------------------------------------------------------------------
diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseMetaHook.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseMetaHook.java
index f01ed57..3565c8c 100644
--- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseMetaHook.java
+++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseMetaHook.java
@@ -32,8 +32,6 @@ import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.Table;
 import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
 import org.apache.hadoop.util.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -46,7 +44,6 @@ import java.util.Set;
  * be used after usage.
  */
 public class HBaseMetaHook implements HiveMetaHook, Closeable {
-  private static final Logger LOG = LoggerFactory.getLogger(HBaseMetaHook.class);
   private Configuration hbaseConf;
   private Admin admin;
 
@@ -102,15 +99,12 @@ public class HBaseMetaHook implements HiveMetaHook, Closeable {
   public void commitDropTable(Table tbl, boolean deleteData) throws MetaException {
     try {
       String tableName = getHBaseTableName(tbl);
-      boolean isPurge = !MetaStoreUtils.isExternalTable(tbl) || MetaStoreUtils.isExternalTablePurge(tbl);
-      if (deleteData && isPurge) {
-        LOG.info("Dropping with purge all the data for data source {}", tableName);
-        if (getHBaseAdmin().tableExists(TableName.valueOf(tableName))) {
-          if (getHBaseAdmin().isTableEnabled(TableName.valueOf(tableName))) {
-            getHBaseAdmin().disableTable(TableName.valueOf(tableName));
-          }
-          getHBaseAdmin().deleteTable(TableName.valueOf(tableName));
+      boolean isExternal = MetaStoreUtils.isExternalTable(tbl);
+      if (deleteData && !isExternal) {
+        if (getHBaseAdmin().isTableEnabled(TableName.valueOf(tableName))) {
+          getHBaseAdmin().disableTable(TableName.valueOf(tableName));
         }
+        getHBaseAdmin().deleteTable(TableName.valueOf(tableName));
       }
     } catch (IOException ie) {
       throw new MetaException(StringUtils.stringifyException(ie));
@@ -119,6 +113,8 @@ public class HBaseMetaHook implements HiveMetaHook, Closeable {
 
   @Override
   public void preCreateTable(Table tbl) throws MetaException {
+    boolean isExternal = MetaStoreUtils.isExternalTable(tbl);
+
     // We'd like to move this to HiveMetaStore for any non-native table, but
     // first we need to support storing NULL for location on a table
     if (tbl.getSd().getLocation() != null) {
@@ -137,24 +133,34 @@ public class HBaseMetaHook implements HiveMetaHook, Closeable {
       HTableDescriptor tableDesc;
 
       if (!getHBaseAdmin().tableExists(TableName.valueOf(tableName))) {
-        // create table from Hive
-        // create the column descriptors
-        tableDesc = new HTableDescriptor(TableName.valueOf(tableName));
-        Set<String> uniqueColumnFamilies = new HashSet<String>();
+        // if it is not an external table then create one
+        if (!isExternal) {
+          // Create the column descriptors
+          tableDesc = new HTableDescriptor(TableName.valueOf(tableName));
+          Set<String> uniqueColumnFamilies = new HashSet<String>();
+
+          for (ColumnMappings.ColumnMapping colMap : columnMappings) {
+            if (!colMap.hbaseRowKey && !colMap.hbaseTimestamp) {
+              uniqueColumnFamilies.add(colMap.familyName);
+            }
+          }
 
-        for (ColumnMappings.ColumnMapping colMap : columnMappings) {
-          if (!colMap.hbaseRowKey && !colMap.hbaseTimestamp) {
-            uniqueColumnFamilies.add(colMap.familyName);
+          for (String columnFamily : uniqueColumnFamilies) {
+            tableDesc.addFamily(new HColumnDescriptor(Bytes.toBytes(columnFamily)));
           }
-        }
 
-        for (String columnFamily : uniqueColumnFamilies) {
-          tableDesc.addFamily(new HColumnDescriptor(Bytes.toBytes(columnFamily)));
+          getHBaseAdmin().createTable(tableDesc);
+        } else {
+          // an external table
+          throw new MetaException("HBase table " + tableName +
+              " doesn't exist while the table is declared as an external table.");
         }
 
-        getHBaseAdmin().createTable(tableDesc);
       } else {
-        // register table in Hive
+        if (!isExternal) {
+          throw new MetaException("Table " + tableName + " already exists within HBase; "
+              + "use CREATE EXTERNAL TABLE instead to register it in Hive.");
+        }
         // make sure the schema mapping is right
         tableDesc = getHBaseAdmin().getTableDescriptor(TableName.valueOf(tableName));
 
@@ -184,10 +190,10 @@ public class HBaseMetaHook implements HiveMetaHook, Closeable {
 
   @Override
   public void rollbackCreateTable(Table table) throws MetaException {
+    boolean isExternal = MetaStoreUtils.isExternalTable(table);
     String tableName = getHBaseTableName(table);
-    boolean isPurge = !MetaStoreUtils.isExternalTable(table) || MetaStoreUtils.isExternalTablePurge(table);
     try {
-      if (isPurge && getHBaseAdmin().tableExists(TableName.valueOf(tableName))) {
+      if (!isExternal && getHBaseAdmin().tableExists(TableName.valueOf(tableName))) {
         // we have created an HBase table, so we delete it to roll back;
         if (getHBaseAdmin().isTableEnabled(TableName.valueOf(tableName))) {
           getHBaseAdmin().disableTable(TableName.valueOf(tableName));

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/negative/cascade_dbdrop.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/negative/cascade_dbdrop.q b/hbase-handler/src/test/queries/negative/cascade_dbdrop.q
index 99e36ac..7f9df5e 100644
--- a/hbase-handler/src/test/queries/negative/cascade_dbdrop.q
+++ b/hbase-handler/src/test/queries/negative/cascade_dbdrop.q
@@ -11,10 +11,10 @@ CREATE DATABASE hbaseDB;
 -- Exit Code < 0 on syntax/usage error
 -- Exit Code > 0 operation failed
 
-CREATE EXTERNAL TABLE hbaseDB.hbase_table_0(key int, value string)
+CREATE TABLE hbaseDB.hbase_table_0(key int, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0");
 
 dfs -ls target/tmp/hbase/data/default/hbase_table_0;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/negative/generatehfiles_require_family_path.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/negative/generatehfiles_require_family_path.q b/hbase-handler/src/test/queries/negative/generatehfiles_require_family_path.q
index ceb9390..6844fbc 100644
--- a/hbase-handler/src/test/queries/negative/generatehfiles_require_family_path.q
+++ b/hbase-handler/src/test/queries/negative/generatehfiles_require_family_path.q
@@ -2,10 +2,9 @@
 
 DROP TABLE IF EXISTS hbase_bulk;
 
-CREATE EXTERNAL TABLE hbase_bulk (key INT, value STRING)
+CREATE TABLE hbase_bulk (key INT, value STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,cf:string')
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,cf:string');
 
 SET hive.hbase.generatehfiles = true;
 INSERT OVERWRITE TABLE hbase_bulk SELECT * FROM src CLUSTER BY key;

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/negative/hbase_ddl.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/negative/hbase_ddl.q b/hbase-handler/src/test/queries/negative/hbase_ddl.q
index 24f684c..2913bcd 100644
--- a/hbase-handler/src/test/queries/negative/hbase_ddl.q
+++ b/hbase-handler/src/test/queries/negative/hbase_ddl.q
@@ -1,8 +1,8 @@
 DROP TABLE hbase_table_1;
-CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0");
 
 DESCRIBE EXTENDED hbase_table_1;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/external_table_ppd.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/external_table_ppd.q b/hbase-handler/src/test/queries/positive/external_table_ppd.q
index 3c10cd1..fbef4bb 100644
--- a/hbase-handler/src/test/queries/positive/external_table_ppd.q
+++ b/hbase-handler/src/test/queries/positive/external_table_ppd.q
@@ -1,6 +1,6 @@
 DROP TABLE t_hbase;
 
-CREATE EXTERNAL TABLE t_hbase(key STRING,
+CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -11,8 +11,7 @@ CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:binarykey#-,cf:binarybyte#-,cf:binaryshort#-,:key#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true");
+               "hbase.table.default.storage.type" = "binary");
 
 DESCRIBE FORMATTED t_hbase;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_binary_binary.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_binary_binary.q b/hbase-handler/src/test/queries/positive/hbase_binary_binary.q
index 7c17ca2..388e5aa 100644
--- a/hbase-handler/src/test/queries/positive/hbase_binary_binary.q
+++ b/hbase-handler/src/test/queries/positive/hbase_binary_binary.q
@@ -1,10 +1,9 @@
 drop table if exists testhbaseb;
-CREATE EXTERNAL TABLE testhbaseb (key int, val binary)
+CREATE TABLE testhbaseb (key int, val binary)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = ":key,cf:val#b"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 insert into table testhbaseb values(1, 'hello');
 insert into table testhbaseb values(2, 'hi');
 select * from testhbaseb;

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_binary_map_queries.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_binary_map_queries.q b/hbase-handler/src/test/queries/positive/hbase_binary_map_queries.q
index af3ee4f..255a2c7 100644
--- a/hbase-handler/src/test/queries/positive/hbase_binary_map_queries.q
+++ b/hbase-handler/src/test/queries/positive/hbase_binary_map_queries.q
@@ -1,14 +1,13 @@
 DROP TABLE hbase_src;
 
-CREATE EXTERNAL TABLE hbase_src(key STRING,
+CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
                        bigint_col BIGINT,
                        float_col FLOAT,
                        double_col DOUBLE,
-                       string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true");
+                       string_col STRING);
 
 INSERT OVERWRITE TABLE hbase_src
   SELECT key, key, key, key, key, key, key, value
@@ -17,7 +16,7 @@ INSERT OVERWRITE TABLE hbase_src
 
 DROP TABLE t_hbase_maps;
 
-CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+CREATE TABLE t_hbase_maps(key STRING,
                           tinyint_map_col MAP<TINYINT, TINYINT>,
                           smallint_map_col MAP<SMALLINT, SMALLINT>,
                           int_map_col MAP<INT, INT>,
@@ -28,7 +27,7 @@ CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
                           boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-tinyint:,cf-smallint:,cf-int:,cf-bigint:,cf-float:,cf-double:,cf-string:,cf-boolean:")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps");
 
 INSERT OVERWRITE TABLE t_hbase_maps
   SELECT key,
@@ -119,7 +118,7 @@ DROP TABLE t_ext_hbase_maps_2;
 
 DROP TABLE t_hbase_maps_1;
 
-CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
+CREATE TABLE t_hbase_maps_1(key STRING,
                             tinyint_map_col MAP<TINYINT, TINYINT>,
                             smallint_map_col MAP<SMALLINT, SMALLINT>,
                             int_map_col MAP<INT, INT>,
@@ -130,7 +129,7 @@ CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
                             boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key#b,cf-tinyint:#b:b,cf-smallint:#b:b,cf-int:#b:b,cf-bigint:#b:b,cf-float:#b:b,cf-double:#b:b,cf-string:#b:b,cf-boolean:#b:b")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1");
 
 INSERT OVERWRITE TABLE t_hbase_maps_1
   SELECT key,

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_binary_map_queries_prefix.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_binary_map_queries_prefix.q b/hbase-handler/src/test/queries/positive/hbase_binary_map_queries_prefix.q
index ead792b..9ff4366 100644
--- a/hbase-handler/src/test/queries/positive/hbase_binary_map_queries_prefix.q
+++ b/hbase-handler/src/test/queries/positive/hbase_binary_map_queries_prefix.q
@@ -1,14 +1,13 @@
 DROP TABLE hbase_src;
 
-CREATE EXTERNAL TABLE hbase_src(key STRING,
+CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
                        bigint_col BIGINT,
                        float_col FLOAT,
                        double_col DOUBLE,
-                       string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true");
+                       string_col STRING);
 
 INSERT OVERWRITE TABLE hbase_src
   SELECT key, key, key, key, key, key, key, value
@@ -17,12 +16,12 @@ INSERT OVERWRITE TABLE hbase_src
 
 DROP TABLE t_hbase_maps;
 
-CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+CREATE TABLE t_hbase_maps(key STRING,
                           string_map_col MAP<STRING, STRING>,
                           simple_string_col STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-string:,cf-string:simple_string_col")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps");
 
 INSERT OVERWRITE TABLE t_hbase_maps
   SELECT key,

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_binary_storage_queries.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_binary_storage_queries.q b/hbase-handler/src/test/queries/positive/hbase_binary_storage_queries.q
index 4e62e0f..b048871 100644
--- a/hbase-handler/src/test/queries/positive/hbase_binary_storage_queries.q
+++ b/hbase-handler/src/test/queries/positive/hbase_binary_storage_queries.q
@@ -1,6 +1,6 @@
 DROP TABLE t_hbase;
 
-CREATE EXTERNAL TABLE t_hbase(key STRING,
+CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -11,8 +11,7 @@ CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true");
+               "hbase.table.default.storage.type" = "binary");
 
 DESCRIBE FORMATTED t_hbase;
 
@@ -93,7 +92,7 @@ DROP TABLE t_hbase_1;
 DROP TABLE t_hbase;
 DROP TABLE t_hbase_2;
 
-CREATE EXTERNAL TABLE t_hbase_2(key STRING,
+CREATE TABLE t_hbase_2(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -103,7 +102,7 @@ CREATE EXTERNAL TABLE t_hbase_2(key STRING,
                      boolean_col BOOLEAN)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
-TBLPROPERTIES ("hbase.table.name" = "t_hive_2", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name" = "t_hive_2");
 
 INSERT OVERWRITE TABLE t_hbase_2
 SELECT 'user1', 1, 1, 1, 1, 1.0, 1.0, true
@@ -192,8 +191,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES (
 "hbase.table.name" = "t_hive_2",
-"hbase.table.default.storage.type" = "binary",
-"external.table.purge" = "true");
+"hbase.table.default.storage.type" = "binary");
 
 SELECT * FROM t_hbase_4;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_custom_key.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_custom_key.q b/hbase-handler/src/test/queries/positive/hbase_custom_key.q
index 7456027..9dbb2a0 100644
--- a/hbase-handler/src/test/queries/positive/hbase_custom_key.q
+++ b/hbase-handler/src/test/queries/positive/hbase_custom_key.q
@@ -1,10 +1,9 @@
-CREATE EXTERNAL TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
+CREATE TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom",
     "hbase.columns.mapping" = ":key,cf:string",
-    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory")
-TBLPROPERTIES ("external.table.purge" = "true");
+    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory");
 
 CREATE EXTERNAL TABLE hbase_ck_2(key string, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_custom_key2.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_custom_key2.q b/hbase-handler/src/test/queries/positive/hbase_custom_key2.q
index f11fb4d..9fba4f6 100644
--- a/hbase-handler/src/test/queries/positive/hbase_custom_key2.q
+++ b/hbase-handler/src/test/queries/positive/hbase_custom_key2.q
@@ -1,10 +1,9 @@
-CREATE EXTERNAL TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
+CREATE TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom2",
     "hbase.columns.mapping" = ":key,cf:string",
-    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2")
-TBLPROPERTIES ("external.table.purge" = "true");
+    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2");
 
 from src tablesample (5 rows)
 insert into table hbase_ck_4 select

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_custom_key3.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_custom_key3.q b/hbase-handler/src/test/queries/positive/hbase_custom_key3.q
index 0bc773a..22d2c9e 100644
--- a/hbase-handler/src/test/queries/positive/hbase_custom_key3.q
+++ b/hbase-handler/src/test/queries/positive/hbase_custom_key3.q
@@ -1,10 +1,9 @@
-CREATE EXTERNAL TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
+CREATE TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom3",
     "hbase.columns.mapping" = ":key,cf:string",
-    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3")
-TBLPROPERTIES ("external.table.purge" = "true");
+    "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3");
 
 from src tablesample (5 rows)
 insert into table hbase_ck_5 select

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_ddl.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_ddl.q b/hbase-handler/src/test/queries/positive/hbase_ddl.q
index 37f7f61..a8bae75 100644
--- a/hbase-handler/src/test/queries/positive/hbase_ddl.q
+++ b/hbase-handler/src/test/queries/positive/hbase_ddl.q
@@ -1,8 +1,8 @@
 DROP TABLE hbase_table_1;
-CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0");
 
 DESCRIBE EXTENDED hbase_table_1;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_decimal_decimal.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_decimal_decimal.q b/hbase-handler/src/test/queries/positive/hbase_decimal_decimal.q
index 016f10b..d943fbd 100644
--- a/hbase-handler/src/test/queries/positive/hbase_decimal_decimal.q
+++ b/hbase-handler/src/test/queries/positive/hbase_decimal_decimal.q
@@ -1,12 +1,11 @@
-CREATE EXTERNAL TABLE testhbase_decimal (
+CREATE TABLE testhbase_decimal (
 id int,
 balance decimal(15,2))
 ROW FORMAT DELIMITED
 COLLECTION ITEMS TERMINATED BY '~'
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
-"hbase.columns.mapping"=":key,cf:balance#b")
-TBLPROPERTIES ("external.table.purge" = "true");
+"hbase.columns.mapping"=":key,cf:balance#b");
 
 insert into testhbase_decimal values (1,1), (2, 2.2), (3, 33.33);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_handler_bulk.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_handler_bulk.q b/hbase-handler/src/test/queries/positive/hbase_handler_bulk.q
index 159574d..d02a61f 100644
--- a/hbase-handler/src/test/queries/positive/hbase_handler_bulk.q
+++ b/hbase-handler/src/test/queries/positive/hbase_handler_bulk.q
@@ -3,10 +3,10 @@
 drop table if exists hb_target;
 
 -- this is the target HBase table
-create external table hb_target(key int, val string)
+create table hb_target(key int, val string)
 stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 with serdeproperties ('hbase.columns.mapping' = ':key,cf:val')
-tblproperties ('hbase.table.name' = 'positive_hbase_handler_bulk', 'external.table.purge' = 'true');
+tblproperties ('hbase.table.name' = 'positive_hbase_handler_bulk');
 
 set hive.hbase.generatehfiles=true;
 set hfile.family.path=/tmp/hb_target/cf;
@@ -27,10 +27,10 @@ drop table hb_target;
 dfs -rmr /tmp/hb_target/cf;
 
 
-create external table hb_target(key int, val string)
+create table hb_target(key int, val string)
 stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 with serdeproperties ('hbase.columns.mapping' = ':key,cf:val')
-tblproperties ('hbase.table.name' = 'positive_hbase_handler_bulk', 'external.table.purge' = 'true');
+tblproperties ('hbase.table.name' = 'positive_hbase_handler_bulk');
 
 -- do it twice - regression test for HIVE-18607
 
@@ -42,3 +42,6 @@ insert overwrite table hb_target select distinct key, value from src cluster by
 
 drop table hb_target;
 dfs -rmr /tmp/hb_target/cf;
+
+
+

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_joins.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_joins.q b/hbase-handler/src/test/queries/positive/hbase_joins.q
index 815e0e3..1616adc 100644
--- a/hbase-handler/src/test/queries/positive/hbase_joins.q
+++ b/hbase-handler/src/test/queries/positive/hbase_joins.q
@@ -5,26 +5,23 @@ DROP TABLE users_level;
 
 -- From HIVE-1257
 
-CREATE EXTERNAL TABLE users(key string, state string, country string, country_id int)
+CREATE TABLE users(key string, state string, country string, country_id int)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "info:state,info:country,info:country_id"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
-CREATE EXTERNAL TABLE states(key string, name string)
+CREATE TABLE states(key string, name string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "state:name"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
-CREATE EXTERNAL TABLE countries(key string, name string, country string, country_id int)
+CREATE TABLE countries(key string, name string, country string, country_id int)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "info:name,info:country,info:country_id"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 INSERT OVERWRITE TABLE users SELECT 'user1', 'IA', 'USA', 0
 FROM src WHERE key=100;
@@ -67,15 +64,13 @@ DROP TABLE users;
 DROP TABLE states;
 DROP TABLE countries;
 
-CREATE EXTERNAL TABLE users(key int, userid int, username string, created int) 
+CREATE TABLE users(key int, userid int, username string, created int) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:userid,f:nickname,f:created")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:userid,f:nickname,f:created");
 
-CREATE EXTERNAL TABLE users_level(key int, userid int, level int)
+CREATE TABLE users_level(key int, userid int, level int)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:userid,f:level")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,f:userid,f:level");
 
 -- HIVE-1903:  the problem fixed here showed up even without any data,
 -- so no need to load any to test it

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_null_first_col.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_null_first_col.q b/hbase-handler/src/test/queries/positive/hbase_null_first_col.q
index 5c5c311..0d9ff56 100644
--- a/hbase-handler/src/test/queries/positive/hbase_null_first_col.q
+++ b/hbase-handler/src/test/queries/positive/hbase_null_first_col.q
@@ -4,12 +4,11 @@ DROP TABLE hbase_null;
 CREATE TABLE src_null(a STRING, b STRING, c STRING, d STRING) STORED AS TEXTFILE;
 LOAD DATA LOCAL INPATH '../../data/files/null.txt' INTO TABLE src_null;
 
-CREATE EXTERNAL TABLE hbase_null(key string, col1 string, col2 string)
+CREATE TABLE hbase_null(key string, col1 string, col2 string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = ":key,cf1:c1,cf1:c2"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 SELECT d, a, c FROM src_null;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_ppd_join.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_ppd_join.q b/hbase-handler/src/test/queries/positive/hbase_ppd_join.q
index 94a397c..2436c19 100644
--- a/hbase-handler/src/test/queries/positive/hbase_ppd_join.q
+++ b/hbase-handler/src/test/queries/positive/hbase_ppd_join.q
@@ -4,11 +4,11 @@ drop table if exists hive1_tbl_data_hbase2;
 drop view if exists hive1_view_data_hbase1;
 drop view if exists hive1_view_data_hbase2;
 
-CREATE EXTERNAL TABLE hive1_tbl_data_hbase1 (COLUMID string,COLUMN_FN string,COLUMN_LN string,EMAIL string,COL_UPDATED_DATE timestamp, PK_COLUM string) 
+CREATE TABLE hive1_tbl_data_hbase1 (COLUMID string,COLUMN_FN string,COLUMN_LN string,EMAIL string,COL_UPDATED_DATE timestamp, PK_COLUM string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
 WITH SERDEPROPERTIES("hbase.columns.mapping" = "default:COLUMID,default:COLUMN_FN,default:COLUMN_LN,default:EMAIL,default:COL_UPDATED_DATE,:key" 
 )
-TBLPROPERTIES ("external.table.purge" = "true");
+;
 
 --create hive view for the above hive table 1
 CREATE VIEW hive1_view_data_hbase1 
@@ -25,11 +25,11 @@ AND COL_UPDATED_DATE IS NOT NULL
 insert into table hive1_tbl_data_hbase1 select '00001','john','doe','john@hotmail.com','2014-01-01 12:01:02','4000-10000' from src where key = 100;
 
 --create hive hbase table 2
-CREATE EXTERNAL TABLE hive1_tbl_data_hbase2 (COLUMID string,COLUMN_FN string,COLUMN_LN string,EMAIL string,COL_UPDATED_DATE timestamp, PK_COLUM string) 
+CREATE TABLE hive1_tbl_data_hbase2 (COLUMID string,COLUMN_FN string,COLUMN_LN string,EMAIL string,COL_UPDATED_DATE timestamp, PK_COLUM string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
 WITH SERDEPROPERTIES("hbase.columns.mapping" = "default:COLUMID,default:COLUMN_FN,default:COLUMN_LN,default:EMAIL,default:COL_UPDATED_DATE,:key" 
 )
-TBLPROPERTIES ("external.table.purge" = "true");
+;
 
 --create hive view for the above hive hbase table 2
 CREATE VIEW hive1_view_data_hbase2 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_ppd_key_range.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_ppd_key_range.q b/hbase-handler/src/test/queries/positive/hbase_ppd_key_range.q
index ffba3f5..59e724d 100644
--- a/hbase-handler/src/test/queries/positive/hbase_ppd_key_range.q
+++ b/hbase-handler/src/test/queries/positive/hbase_ppd_key_range.q
@@ -1,7 +1,6 @@
-CREATE EXTERNAL TABLE hbase_pushdown(key string, value string) 
+CREATE TABLE hbase_pushdown(key string, value string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string");
 
 INSERT OVERWRITE TABLE hbase_pushdown 
 SELECT cast(key as string), value

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_pushdown.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_pushdown.q b/hbase-handler/src/test/queries/positive/hbase_pushdown.q
index 24c1fac..0d29c82 100644
--- a/hbase-handler/src/test/queries/positive/hbase_pushdown.q
+++ b/hbase-handler/src/test/queries/positive/hbase_pushdown.q
@@ -1,7 +1,6 @@
-CREATE EXTERNAL TABLE hbase_pushdown(key int, value string) 
+CREATE TABLE hbase_pushdown(key int, value string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string");
 
 INSERT OVERWRITE TABLE hbase_pushdown 
 SELECT *

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_queries.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_queries.q b/hbase-handler/src/test/queries/positive/hbase_queries.q
index 6c3d7cd..4604f3e 100644
--- a/hbase-handler/src/test/queries/positive/hbase_queries.q
+++ b/hbase-handler/src/test/queries/positive/hbase_queries.q
@@ -1,8 +1,8 @@
 DROP TABLE hbase_table_1;
-CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true");
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0");
 
 DESCRIBE EXTENDED hbase_table_1;
 
@@ -52,10 +52,9 @@ ON (x.key = Y.key)
 ORDER BY key,value;
 
 DROP TABLE empty_hbase_table;
-CREATE EXTERNAL TABLE empty_hbase_table(key int, value string) 
+CREATE TABLE empty_hbase_table(key int, value string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string");
 
 DROP TABLE empty_normal_table;
 CREATE TABLE empty_normal_table(key int, value string);
@@ -65,12 +64,11 @@ select * from (select count(1) c from empty_normal_table union all select count(
 select * from (select count(1) c from src union all select count(1) as c from empty_hbase_table) x order by c;
 select * from (select count(1) c from src union all select count(1) as c from hbase_table_1) x order by c;
 
-CREATE EXTERNAL TABLE hbase_table_3(key int, value string, count int) 
+CREATE TABLE hbase_table_3(key int, value string, count int) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "cf:val,cf2:count"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 EXPLAIN 
 INSERT OVERWRITE TABLE hbase_table_3
@@ -94,12 +92,11 @@ select * from hbase_table_3 order by key, value limit 5;
 select key, count from hbase_table_3 order by key, count desc limit 5;
 
 DROP TABLE hbase_table_4;
-CREATE EXTERNAL TABLE hbase_table_4(key int, value1 string, value2 int, value3 int) 
+CREATE TABLE hbase_table_4(key int, value1 string, value2 int, value3 int) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "a:b,a:c,d:e"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 INSERT OVERWRITE TABLE hbase_table_4 SELECT key, value, key+1, key+2 
 FROM src WHERE key=98 OR key=100;
@@ -115,24 +112,22 @@ TBLPROPERTIES ("hbase.table.name" = "hbase_table_4");
 SELECT * FROM hbase_table_5 ORDER BY key;
 
 DROP TABLE hbase_table_6;
-CREATE EXTERNAL TABLE hbase_table_6(key int, value map<string,string>) 
+CREATE TABLE hbase_table_6(key int, value map<string,string>) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = ":key,cf:"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 INSERT OVERWRITE TABLE hbase_table_6 SELECT key, map(value, key) FROM src
 WHERE key=98 OR key=100;
 
 SELECT * FROM hbase_table_6 ORDER BY key;
 
 DROP TABLE hbase_table_7;
-CREATE EXTERNAL TABLE hbase_table_7(value map<string,string>, key int) 
+CREATE TABLE hbase_table_7(value map<string,string>, key int) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "cf:,:key"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 INSERT OVERWRITE TABLE hbase_table_7 
 SELECT map(value, key, upper(value), key+1), key FROM src
 WHERE key=98 OR key=100;
@@ -142,12 +137,11 @@ SELECT * FROM hbase_table_7 ORDER BY key;
 set hive.hbase.wal.enabled=false;
 
 DROP TABLE hbase_table_8;
-CREATE EXTERNAL TABLE hbase_table_8(key int, value1 string, value2 int, value3 int) 
+CREATE TABLE hbase_table_8(key int, value1 string, value2 int, value3 int) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "a:b,a:c,d:e"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 INSERT OVERWRITE TABLE hbase_table_8 SELECT key, value, key+1, key+2 
 FROM src WHERE key=98 OR key=100;
@@ -171,10 +165,9 @@ SELECT COUNT(*) FROM hbase_table_1_like;
 SHOW CREATE TABLE hbase_table_1_like;
 
 DROP TABLE IF EXISTS hbase_table_9;
-CREATE EXTERNAL TABLE hbase_table_9 (id bigint, data map<string, string>, str string)
+CREATE TABLE hbase_table_9 (id bigint, data map<string, string>, str string)
 stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-with serdeproperties ("hbase.columns.mapping" = ":key,cf:map_col#s:s,cf:str_col")
-TBLPROPERTIES ("external.table.purge" = "true");
+with serdeproperties ("hbase.columns.mapping" = ":key,cf:map_col#s:s,cf:str_col");
 
 insert overwrite table hbase_table_9 select 1 as id, map('abcd', null) as data , null as str from src limit 1;
 insert into table hbase_table_9 select 2 as id, map('efgh', null) as data , '1234' as str from src limit 1;
@@ -184,10 +177,9 @@ insert into table hbase_table_9 select 5 as id, map('key1',null, 'key2', 'avalue
 select * from hbase_table_9;
 
 DROP TABLE IF EXISTS hbase_table_10;
-CREATE EXTERNAL TABLE hbase_table_10 (id bigint, data map<int, int>, str string)
+CREATE TABLE hbase_table_10 (id bigint, data map<int, int>, str string)
 stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-with serdeproperties ("hbase.columns.mapping" = ":key,cf:map_col2,cf:str2_col")
-TBLPROPERTIES ("external.table.purge" = "true");
+with serdeproperties ("hbase.columns.mapping" = ":key,cf:map_col2,cf:str2_col");
 set hive.cbo.enable=false;
 insert overwrite table hbase_table_10 select 1 as id, map(10, cast(null as int)) as data , null as str from src limit 1;
 insert into table hbase_table_10 select 2 as id, map(20, cast(null as int)) as data , '1234' as str from src limit 1;
@@ -198,18 +190,16 @@ select * from hbase_table_10;
 
 
 DROP TABLE IF EXISTS hbase_table_11;
-CREATE EXTERNAL TABLE hbase_table_11(id INT, map_column STRUCT<s_int:INT,s_string:STRING,s_date:DATE>)
+CREATE TABLE hbase_table_11(id INT, map_column STRUCT<s_int:INT,s_string:STRING,s_date:DATE>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ('hbase.columns.mapping'=':key,id:id')
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ('hbase.columns.mapping'=':key,id:id');
 INSERT INTO hbase_table_11 SELECT 2,NAMED_STRUCT("s_int",CAST(NULL AS INT),"s_string","s1","s_date",CAST('2018-03-12' AS DATE)) FROM src LIMIT 1;
 select * from hbase_table_11;
 
 DROP TABLE IF EXISTS hbase_table_12;
-CREATE EXTERNAL TABLE hbase_table_12(id INT, list_column ARRAY <STRING>)
+CREATE TABLE hbase_table_12(id INT, list_column ARRAY <STRING>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ('hbase.columns.mapping'=':key,id:id')
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ('hbase.columns.mapping'=':key,id:id');
 INSERT INTO hbase_table_12 SELECT 2, ARRAY("a", CAST (NULL AS STRING),  "b") FROM src LIMIT 1;
 select * from hbase_table_12;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_scan_params.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_scan_params.q b/hbase-handler/src/test/queries/positive/hbase_scan_params.q
index 7bea8f0..14d7d15 100644
--- a/hbase-handler/src/test/queries/positive/hbase_scan_params.q
+++ b/hbase-handler/src/test/queries/positive/hbase_scan_params.q
@@ -1,8 +1,7 @@
-CREATE EXTERNAL TABLE hbase_pushdown(key int, value string)
+CREATE TABLE hbase_pushdown(key int, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string",
-"hbase.scan.cache" = "500", "hbase.scan.cacheblocks" = "true", "hbase.scan.batch" = "1")
-TBLPROPERTIES ("external.table.purge" = "true");
+"hbase.scan.cache" = "500", "hbase.scan.cacheblocks" = "true", "hbase.scan.batch" = "1");
 
 INSERT OVERWRITE TABLE hbase_pushdown SELECT * FROM src;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_single_sourced_multi_insert.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_single_sourced_multi_insert.q b/hbase-handler/src/test/queries/positive/hbase_single_sourced_multi_insert.q
index 4ca0297..96fec0e 100644
--- a/hbase-handler/src/test/queries/positive/hbase_single_sourced_multi_insert.q
+++ b/hbase-handler/src/test/queries/positive/hbase_single_sourced_multi_insert.q
@@ -1,9 +1,8 @@
 -- HIVE-4375 Single sourced multi insert consists of native and non-native table mixed throws NPE
 CREATE TABLE src_x1(key string, value string);
-CREATE EXTERNAL TABLE src_x2(key string, value string)
+CREATE TABLE src_x2(key string, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key, cf:value")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key, cf:value");
 
 explain
 from src a

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_timestamp.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_timestamp.q b/hbase-handler/src/test/queries/positive/hbase_timestamp.q
index 19db69d..6ae2c30 100644
--- a/hbase-handler/src/test/queries/positive/hbase_timestamp.q
+++ b/hbase-handler/src/test/queries/positive/hbase_timestamp.q
@@ -1,25 +1,22 @@
 DROP TABLE hbase_table;
-CREATE EXTERNAL TABLE hbase_table (key string, value string, `time` timestamp)
+CREATE TABLE hbase_table (key string, value string, `time` timestamp)
   STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp")
-  TBLPROPERTIES ("external.table.purge" = "true");
+  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp");
 DESC extended hbase_table;
 FROM src INSERT OVERWRITE TABLE hbase_table SELECT key, value, "2012-02-23 10:14:52" WHERE (key % 17) = 0;
 SELECT * FROM hbase_table;
 
 DROP TABLE hbase_table;
-CREATE EXTERNAL TABLE hbase_table (key string, value string, `time` bigint)
+CREATE TABLE hbase_table (key string, value string, `time` bigint)
   STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp")
-  TBLPROPERTIES ("external.table.purge" = "true");
+  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp");
 FROM src INSERT OVERWRITE TABLE hbase_table SELECT key, value, 1329959754000 WHERE (key % 17) = 0;
 SELECT key, value, cast(`time` as timestamp) FROM hbase_table;
 
 DROP TABLE hbase_table;
-CREATE EXTERNAL TABLE hbase_table (key string, value string, `time` bigint)
+CREATE TABLE hbase_table (key string, value string, `time` bigint)
   STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp")
-  TBLPROPERTIES ("external.table.purge" = "true");
+  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string,:timestamp");
 insert overwrite table hbase_table select key,value,ts FROM
 (
   select key, value, 100000000000 as ts from src WHERE (key % 33) = 0
@@ -44,10 +41,9 @@ SELECT key, value, cast(`time` as timestamp) FROM hbase_table WHERE key > 100 AN
 SELECT key, value, cast(`time` as timestamp) FROM hbase_table WHERE key > 100 AND key < 400 AND `time` >= 200000000000;
 
 DROP TABLE hbase_table;
-CREATE EXTERNAL TABLE hbase_table(key string, value map<string, string>, `time` timestamp)
+CREATE TABLE hbase_table(key string, value map<string, string>, `time` timestamp)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:,:timestamp")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:,:timestamp");
 FROM src INSERT OVERWRITE TABLE hbase_table SELECT key, MAP("name", CONCAT(value, " Jr")), "2012-02-23 10:14:52" WHERE (key % 17) = 0;
 FROM src INSERT INTO TABLE hbase_table SELECT key, MAP("age", '40'), "2015-12-12 12:12:12" WHERE (key % 17) = 0;
 FROM src INSERT INTO TABLE hbase_table SELECT key, MAP("name", value), "2000-01-01 01:01:01" WHERE (key % 17) = 0;

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_timestamp_format.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_timestamp_format.q b/hbase-handler/src/test/queries/positive/hbase_timestamp_format.q
index 7ed0495..a8d5501 100644
--- a/hbase-handler/src/test/queries/positive/hbase_timestamp_format.q
+++ b/hbase-handler/src/test/queries/positive/hbase_timestamp_format.q
@@ -1,8 +1,8 @@
 
-create external table hbase_str(rowkey string,mytime string,mystr string)
+create table hbase_str(rowkey string,mytime string,mystr string)
   STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
   WITH SERDEPROPERTIES ('hbase.columns.mapping' = 'm:mytime,m:mystr')
-  TBLPROPERTIES ('hbase.table.name' = 'hbase_ts', 'external.table.purge' = 'true');
+  TBLPROPERTIES ('hbase.table.name' = 'hbase_ts');
 
 describe hbase_str;
 insert overwrite table hbase_str select key, '2001-02-03-04.05.06.123456', value from src limit 3;

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbase_viewjoins.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbase_viewjoins.q b/hbase-handler/src/test/queries/positive/hbase_viewjoins.q
index f18a099..5c98903 100644
--- a/hbase-handler/src/test/queries/positive/hbase_viewjoins.q
+++ b/hbase-handler/src/test/queries/positive/hbase_viewjoins.q
@@ -2,7 +2,7 @@ DROP VIEW IF EXISTS VIEW_HBASE_TABLE_TEST_2;
 DROP VIEW IF EXISTS VIEW_HBASE_TABLE_TEST_1;
 DROP TABLE IF EXISTS HBASE_TABLE_TEST_2;
 DROP TABLE IF EXISTS HBASE_TABLE_TEST_1;
-CREATE EXTERNAL TABLE HBASE_TABLE_TEST_1(
+CREATE TABLE HBASE_TABLE_TEST_1(
   cvalue string ,
   pk string,
  ccount int   )
@@ -17,12 +17,11 @@ WITH SERDEPROPERTIES (
   'serialization.format'='1')
 TBLPROPERTIES (
   'hbase.table.name'='hbase_table_test_1',
-  'serialization.null.format'='',
-  'external.table.purge' = 'true');
+  'serialization.null.format'=''  );
 
 CREATE VIEW VIEW_HBASE_TABLE_TEST_1 AS SELECT hbase_table_test_1.cvalue,hbase_table_test_1.pk,hbase_table_test_1.ccount FROM hbase_table_test_1 WHERE hbase_table_test_1.ccount IS NOT NULL;
 
-CREATE EXTERNAL TABLE HBASE_TABLE_TEST_2(
+CREATE TABLE HBASE_TABLE_TEST_2(
   cvalue string ,
     pk string ,
    ccount int  )
@@ -37,8 +36,7 @@ WITH SERDEPROPERTIES (
   'serialization.format'='1')
 TBLPROPERTIES (
   'hbase.table.name'='hbase_table_test_2',
-  'serialization.null.format'='',
-  'external.table.purge' = 'true');
+  'serialization.null.format'='');
 
 CREATE VIEW VIEW_HBASE_TABLE_TEST_2 AS SELECT hbase_table_test_2.cvalue,hbase_table_test_2.pk,hbase_table_test_2.ccount
 FROM hbase_table_test_2 WHERE  hbase_table_test_2.pk >='3-0000h-0' AND hbase_table_test_2.pk <= '3-0000h-g' AND

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/hbasestats.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/hbasestats.q b/hbase-handler/src/test/queries/positive/hbasestats.q
index 98933ed..52e11c9 100644
--- a/hbase-handler/src/test/queries/positive/hbasestats.q
+++ b/hbase-handler/src/test/queries/positive/hbasestats.q
@@ -1,11 +1,10 @@
 DROP TABLE users;
 
-CREATE EXTERNAL TABLE users(key string, state string, country string, country_id int)
+CREATE TABLE users(key string, state string, country string, country_id int)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = "info:state,info:country,info:country_id"
-)
-TBLPROPERTIES ("external.table.purge" = "true");
+);
 
 desc formatted users;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/queries/positive/ppd_key_ranges.q
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/queries/positive/ppd_key_ranges.q b/hbase-handler/src/test/queries/positive/ppd_key_ranges.q
index 186f742..0497d25 100644
--- a/hbase-handler/src/test/queries/positive/ppd_key_ranges.q
+++ b/hbase-handler/src/test/queries/positive/ppd_key_ranges.q
@@ -1,7 +1,6 @@
-CREATE EXTERNAL TABLE hbase_ppd_keyrange(key int, value string) 
+CREATE TABLE hbase_ppd_keyrange(key int, value string) 
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
-WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#binary,cf:string")
-TBLPROPERTIES ("external.table.purge" = "true");
+WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#binary,cf:string");
 
 INSERT OVERWRITE TABLE hbase_ppd_keyrange 
 SELECT *

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/negative/cascade_dbdrop.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/negative/cascade_dbdrop.q.out b/hbase-handler/src/test/results/negative/cascade_dbdrop.q.out
index 803e35e..cef7a06 100644
--- a/hbase-handler/src/test/results/negative/cascade_dbdrop.q.out
+++ b/hbase-handler/src/test/results/negative/cascade_dbdrop.q.out
@@ -4,17 +4,17 @@ PREHOOK: Output: database:hbaseDB
 POSTHOOK: query: CREATE DATABASE hbaseDB
 POSTHOOK: type: CREATEDATABASE
 POSTHOOK: Output: database:hbaseDB
-PREHOOK: query: CREATE EXTERNAL TABLE hbaseDB.hbase_table_0(key int, value string)
+PREHOOK: query: CREATE TABLE hbaseDB.hbase_table_0(key int, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:hbasedb
 PREHOOK: Output: hbaseDB@hbase_table_0
-POSTHOOK: query: CREATE EXTERNAL TABLE hbaseDB.hbase_table_0(key int, value string)
+POSTHOOK: query: CREATE TABLE hbaseDB.hbase_table_0(key int, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:hbasedb
 POSTHOOK: Output: hbaseDB@hbase_table_0

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/negative/generatehfiles_require_family_path.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/negative/generatehfiles_require_family_path.q.out b/hbase-handler/src/test/results/negative/generatehfiles_require_family_path.q.out
index aab4cf9..52ac38f 100644
--- a/hbase-handler/src/test/results/negative/generatehfiles_require_family_path.q.out
+++ b/hbase-handler/src/test/results/negative/generatehfiles_require_family_path.q.out
@@ -2,17 +2,15 @@ PREHOOK: query: DROP TABLE IF EXISTS hbase_bulk
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE IF EXISTS hbase_bulk
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_bulk (key INT, value STRING)
+PREHOOK: query: CREATE TABLE hbase_bulk (key INT, value STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,cf:string')
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_bulk
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_bulk (key INT, value STRING)
+POSTHOOK: query: CREATE TABLE hbase_bulk (key INT, value STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,cf:string')
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_bulk

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/negative/hbase_ddl.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/negative/hbase_ddl.q.out b/hbase-handler/src/test/results/negative/hbase_ddl.q.out
index e4c146b..fde2fc5 100644
--- a/hbase-handler/src/test/results/negative/hbase_ddl.q.out
+++ b/hbase-handler/src/test/results/negative/hbase_ddl.q.out
@@ -2,17 +2,17 @@ PREHOOK: query: DROP TABLE hbase_table_1
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE hbase_table_1
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+PREHOOK: query: CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_table_1
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+POSTHOOK: query: CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_table_1

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/external_table_ppd.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/external_table_ppd.q.out b/hbase-handler/src/test/results/positive/external_table_ppd.q.out
index 6832920..aed43cf 100644
--- a/hbase-handler/src/test/results/positive/external_table_ppd.q.out
+++ b/hbase-handler/src/test/results/positive/external_table_ppd.q.out
@@ -2,7 +2,7 @@ PREHOOK: query: DROP TABLE t_hbase
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -13,12 +13,11 @@ PREHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:binarykey#-,cf:binarybyte#-,cf:binaryshort#-,:key#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true")
+               "hbase.table.default.storage.type" = "binary")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -29,8 +28,7 @@ POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:binarykey#-,cf:binarybyte#-,cf:binaryshort#-,:key#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true")
+               "hbase.table.default.storage.type" = "binary")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase
@@ -55,12 +53,10 @@ Database:           	default
 #### A masked pattern was here ####
 Retention:          	0                   	 
 #### A masked pattern was here ####
-Table Type:         	EXTERNAL_TABLE      	 
+Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"bigint_col\":\"true\",\"boolean_col\":\"true\",\"double_col\":\"true\",\"float_col\":\"true\",\"int_col\":\"true\",\"key\":\"true\",\"smallint_col\":\"true\",\"tinyint_col\":\"true\"}}
-	EXTERNAL            	TRUE                
 	bucketing_version   	2                   
-	external.table.purge	true                
 	hbase.table.default.storage.type	binary              
 	hbase.table.name    	t_hive              
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_binary_binary.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_binary_binary.q.out b/hbase-handler/src/test/results/positive/hbase_binary_binary.q.out
index debe89c..e04227f 100644
--- a/hbase-handler/src/test/results/positive/hbase_binary_binary.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_binary_binary.q.out
@@ -2,21 +2,19 @@ PREHOOK: query: drop table if exists testhbaseb
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: drop table if exists testhbaseb
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE testhbaseb (key int, val binary)
+PREHOOK: query: CREATE TABLE testhbaseb (key int, val binary)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = ":key,cf:val#b"
 )
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@testhbaseb
-POSTHOOK: query: CREATE EXTERNAL TABLE testhbaseb (key int, val binary)
+POSTHOOK: query: CREATE TABLE testhbaseb (key int, val binary)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
 "hbase.columns.mapping" = ":key,cf:val#b"
 )
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@testhbaseb

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_binary_map_queries.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_binary_map_queries.q.out b/hbase-handler/src/test/results/positive/hbase_binary_map_queries.q.out
index 57fea2c..feaca4b 100644
--- a/hbase-handler/src/test/results/positive/hbase_binary_map_queries.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_binary_map_queries.q.out
@@ -2,7 +2,7 @@ PREHOOK: query: DROP TABLE hbase_src
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE hbase_src
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
+PREHOOK: query: CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
@@ -10,11 +10,10 @@ PREHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
                        float_col FLOAT,
                        double_col DOUBLE,
                        string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_src
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
+POSTHOOK: query: CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
@@ -22,7 +21,6 @@ POSTHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
                        float_col FLOAT,
                        double_col DOUBLE,
                        string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_src
@@ -52,7 +50,7 @@ PREHOOK: query: DROP TABLE t_hbase_maps
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase_maps
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase_maps(key STRING,
                           tinyint_map_col MAP<TINYINT, TINYINT>,
                           smallint_map_col MAP<SMALLINT, SMALLINT>,
                           int_map_col MAP<INT, INT>,
@@ -63,11 +61,11 @@ PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
                           boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-tinyint:,cf-smallint:,cf-int:,cf-bigint:,cf-float:,cf-double:,cf-string:,cf-boolean:")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase_maps
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase_maps(key STRING,
                           tinyint_map_col MAP<TINYINT, TINYINT>,
                           smallint_map_col MAP<SMALLINT, SMALLINT>,
                           int_map_col MAP<INT, INT>,
@@ -78,7 +76,7 @@ POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
                           boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-tinyint:,cf-smallint:,cf-int:,cf-bigint:,cf-float:,cf-double:,cf-string:,cf-boolean:")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase_maps
@@ -316,7 +314,7 @@ PREHOOK: query: DROP TABLE t_hbase_maps_1
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase_maps_1
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase_maps_1(key STRING,
                             tinyint_map_col MAP<TINYINT, TINYINT>,
                             smallint_map_col MAP<SMALLINT, SMALLINT>,
                             int_map_col MAP<INT, INT>,
@@ -327,11 +325,11 @@ PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
                             boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key#b,cf-tinyint:#b:b,cf-smallint:#b:b,cf-int:#b:b,cf-bigint:#b:b,cf-float:#b:b,cf-double:#b:b,cf-string:#b:b,cf-boolean:#b:b")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase_maps_1
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase_maps_1(key STRING,
                             tinyint_map_col MAP<TINYINT, TINYINT>,
                             smallint_map_col MAP<SMALLINT, SMALLINT>,
                             int_map_col MAP<INT, INT>,
@@ -342,7 +340,7 @@ POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps_1(key STRING,
                             boolean_map_col MAP<BOOLEAN, BOOLEAN>)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key#b,cf-tinyint:#b:b,cf-smallint:#b:b,cf-int:#b:b,cf-bigint:#b:b,cf-float:#b:b,cf-double:#b:b,cf-string:#b:b,cf-boolean:#b:b")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps_1")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase_maps_1

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_binary_map_queries_prefix.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_binary_map_queries_prefix.q.out b/hbase-handler/src/test/results/positive/hbase_binary_map_queries_prefix.q.out
index 946d722..f6432b3 100644
--- a/hbase-handler/src/test/results/positive/hbase_binary_map_queries_prefix.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_binary_map_queries_prefix.q.out
@@ -2,7 +2,7 @@ PREHOOK: query: DROP TABLE hbase_src
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE hbase_src
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
+PREHOOK: query: CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
@@ -10,11 +10,10 @@ PREHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
                        float_col FLOAT,
                        double_col DOUBLE,
                        string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_src
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
+POSTHOOK: query: CREATE TABLE hbase_src(key STRING,
                        tinyint_col TINYINT,
                        smallint_col SMALLINT,
                        int_col INT,
@@ -22,7 +21,6 @@ POSTHOOK: query: CREATE EXTERNAL TABLE hbase_src(key STRING,
                        float_col FLOAT,
                        double_col DOUBLE,
                        string_col STRING)
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_src
@@ -52,21 +50,21 @@ PREHOOK: query: DROP TABLE t_hbase_maps
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase_maps
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase_maps(key STRING,
                           string_map_col MAP<STRING, STRING>,
                           simple_string_col STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-string:,cf-string:simple_string_col")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase_maps
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_maps(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase_maps(key STRING,
                           string_map_col MAP<STRING, STRING>,
                           simple_string_col STRING)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf-string:,cf-string:simple_string_col")
-TBLPROPERTIES ("hbase.table.name"="t_hive_maps", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name"="t_hive_maps")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase_maps

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out b/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
index 1209c88..172db75 100644
--- a/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_binary_storage_queries.q.out
@@ -2,7 +2,7 @@ PREHOOK: query: DROP TABLE t_hbase
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -13,12 +13,11 @@ PREHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true")
+               "hbase.table.default.storage.type" = "binary")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -29,8 +28,7 @@ POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase(key STRING,
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES ("hbase.table.name" = "t_hive",
-               "hbase.table.default.storage.type" = "binary",
-               "external.table.purge" = "true")
+               "hbase.table.default.storage.type" = "binary")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase
@@ -55,12 +53,10 @@ Database:           	default
 #### A masked pattern was here ####
 Retention:          	0                   	 
 #### A masked pattern was here ####
-Table Type:         	EXTERNAL_TABLE      	 
+Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
 	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"bigint_col\":\"true\",\"boolean_col\":\"true\",\"double_col\":\"true\",\"float_col\":\"true\",\"int_col\":\"true\",\"key\":\"true\",\"smallint_col\":\"true\",\"tinyint_col\":\"true\"}}
-	EXTERNAL            	TRUE                
 	bucketing_version   	2                   
-	external.table.purge	true                
 	hbase.table.default.storage.type	binary              
 	hbase.table.name    	t_hive              
 	numFiles            	0                   
@@ -342,7 +338,7 @@ PREHOOK: query: DROP TABLE t_hbase_2
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE t_hbase_2
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_2(key STRING,
+PREHOOK: query: CREATE TABLE t_hbase_2(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -352,11 +348,11 @@ PREHOOK: query: CREATE EXTERNAL TABLE t_hbase_2(key STRING,
                      boolean_col BOOLEAN)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
-TBLPROPERTIES ("hbase.table.name" = "t_hive_2", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "t_hive_2")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase_2
-POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_2(key STRING,
+POSTHOOK: query: CREATE TABLE t_hbase_2(key STRING,
                      tinyint_col TINYINT,
                      smallint_col SMALLINT,
                      int_col INT,
@@ -366,7 +362,7 @@ POSTHOOK: query: CREATE EXTERNAL TABLE t_hbase_2(key STRING,
                      boolean_col BOOLEAN)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
-TBLPROPERTIES ("hbase.table.name" = "t_hive_2", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "t_hive_2")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase_2
@@ -590,8 +586,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES (
 "hbase.table.name" = "t_hive_2",
-"hbase.table.default.storage.type" = "binary",
-"external.table.purge" = "true")
+"hbase.table.default.storage.type" = "binary")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@t_hbase_4
@@ -607,8 +602,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key#-,cf:binarybyte#-,cf:binaryshort#-,cf:binaryint#-,cf:binarylong#-,cf:binaryfloat#-,cf:binarydouble#-,cf:binaryboolean#-")
 TBLPROPERTIES (
 "hbase.table.name" = "t_hive_2",
-"hbase.table.default.storage.type" = "binary",
-"external.table.purge" = "true")
+"hbase.table.default.storage.type" = "binary")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@t_hbase_4

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_custom_key.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_custom_key.q.out b/hbase-handler/src/test/results/positive/hbase_custom_key.q.out
index bd3bfcf..e5bc947 100644
--- a/hbase-handler/src/test/results/positive/hbase_custom_key.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_custom_key.q.out
@@ -1,20 +1,18 @@
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
+PREHOOK: query: CREATE TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory")
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_ck_1
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
+POSTHOOK: query: CREATE TABLE hbase_ck_1(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory")
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_ck_1

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_custom_key2.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_custom_key2.q.out b/hbase-handler/src/test/results/positive/hbase_custom_key2.q.out
index 8355a43..5d381e7 100644
--- a/hbase-handler/src/test/results/positive/hbase_custom_key2.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_custom_key2.q.out
@@ -1,20 +1,18 @@
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
+PREHOOK: query: CREATE TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom2",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2")
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_ck_4
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
+POSTHOOK: query: CREATE TABLE hbase_ck_4(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom2",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2")
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_ck_4

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_custom_key3.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_custom_key3.q.out b/hbase-handler/src/test/results/positive/hbase_custom_key3.q.out
index 6878190..1b042fd 100644
--- a/hbase-handler/src/test/results/positive/hbase_custom_key3.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_custom_key3.q.out
@@ -1,20 +1,18 @@
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
+PREHOOK: query: CREATE TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom3",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3")
-TBLPROPERTIES ("external.table.purge" = "true")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_ck_5
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
+POSTHOOK: query: CREATE TABLE hbase_ck_5(key struct<col1:string,col2:string,col3:string>, value string)
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES (
     "hbase.table.name" = "hbase_custom3",
     "hbase.columns.mapping" = ":key,cf:string",
     "hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3")
-TBLPROPERTIES ("external.table.purge" = "true")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_ck_5

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_ddl.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_ddl.q.out b/hbase-handler/src/test/results/positive/hbase_ddl.q.out
index 4cb2083..9d16034 100644
--- a/hbase-handler/src/test/results/positive/hbase_ddl.q.out
+++ b/hbase-handler/src/test/results/positive/hbase_ddl.q.out
@@ -2,17 +2,17 @@ PREHOOK: query: DROP TABLE hbase_table_1
 PREHOOK: type: DROPTABLE
 POSTHOOK: query: DROP TABLE hbase_table_1
 POSTHOOK: type: DROPTABLE
-PREHOOK: query: CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+PREHOOK: query: CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@hbase_table_1
-POSTHOOK: query: CREATE EXTERNAL TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
+POSTHOOK: query: CREATE TABLE hbase_table_1(key int comment 'It is a column key', value string comment 'It is the column string value')
 STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
 WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:string")
-TBLPROPERTIES ("hbase.table.name" = "hbase_table_0", "external.table.purge" = "true")
+TBLPROPERTIES ("hbase.table.name" = "hbase_table_0")
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@hbase_table_1
@@ -110,11 +110,9 @@ Database:           	default
 #### A masked pattern was here ####
 Retention:          	0                   	 
 #### A masked pattern was here ####
-Table Type:         	EXTERNAL_TABLE      	 
+Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
-	EXTERNAL            	TRUE                
 	bucketing_version   	2                   
-	external.table.purge	true                
 	hbase.mapred.output.outputtable	kkk                 
 	hbase.table.name    	hbase_table_0       
 #### A masked pattern was here ####
@@ -159,11 +157,9 @@ Database:           	default
 #### A masked pattern was here ####
 Retention:          	0                   	 
 #### A masked pattern was here ####
-Table Type:         	EXTERNAL_TABLE      	 
+Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
-	EXTERNAL            	TRUE                
 	bucketing_version   	2                   
-	external.table.purge	true                
 	hbase.table.name    	hbase_table_0       
 #### A masked pattern was here ####
 	numFiles            	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/7a41f0b5/hbase-handler/src/test/results/positive/hbase_decimal_decimal.q.out
----------------------------------------------------------------------
diff --git a/hbase-handler/src/test/results/positive/hbase_decimal_decimal.q.out b/hbase-handler/src/test/results/positive/hbase_decimal_decimal.q.out
index aa9a5ac..6bd4f73 100644
Binary files a/hbase-handler/src/test/results/positive/hbase_decimal_decimal.q.out and b/hbase-handler/src/test/results/positive/hbase_decimal_decimal.q.out differ