hive git commit: HIVE-14878 : integrate MM tables into ACID: add separate ACID type (Wei Zheng) [Forced Update!]
Repository: hive Updated Branches: refs/heads/hive-14535 c7fb2dbaa -> b6571eaef (forced update) HIVE-14878 : integrate MM tables into ACID: add separate ACID type (Wei Zheng) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b6571eae Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b6571eae Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b6571eae Branch: refs/heads/hive-14535 Commit: b6571eaef2659672a9d3cdf36e2fa6f2168f8063 Parents: 9ecffcb Author: Wei Zheng Authored: Tue Oct 18 15:13:20 2016 -0700 Committer: Wei Zheng Committed: Tue Oct 18 15:14:33 2016 -0700 -- .../org/apache/hadoop/hive/conf/HiveConf.java | 10 +- .../TransactionalValidationListener.java| 39 --- .../hadoop/hive/ql/exec/FileSinkOperator.java | 15 ++- .../apache/hadoop/hive/ql/exec/MoveTask.java| 3 +- .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 44 ++- .../hadoop/hive/ql/parse/SemanticAnalyzer.java | 34 +++--- .../queries/clientpositive/mm_insertonly_acid.q | 16 +++ .../clientpositive/mm_insertonly_acid.q.out | 115 +++ 8 files changed, 236 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hive/blob/b6571eae/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java -- diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 23314ed..ccc29f8 100644 --- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -1787,10 +1787,12 @@ public class HiveConf extends Configuration { HIVE_TXN_OPERATIONAL_PROPERTIES("hive.txn.operational.properties", 0, "Sets the operational properties that control the appropriate behavior for various\n" -+ "versions of the Hive ACID subsystem. Setting it to zero will turn on the legacy mode\n" -+ "for ACID, while setting it to one will enable a split-update feature found in the newer\n" -+ "version of Hive ACID subsystem. Mostly it is intended to be used as an internal property\n" -+ "for future versions of ACID. (See HIVE-14035 for details.)"), ++ "versions of the Hive ACID subsystem. Mostly it is intended to be used as an internal property\n" ++ "for future versions of ACID. (See HIVE-14035 for details.)\n" ++ "0: Turn on the legacy mode for ACID\n" ++ "1: Enable split-update feature found in the newer version of Hive ACID subsystem\n" ++ "2: Hash-based merge, which combines delta files using GRACE hash join based approach (not implemented)\n" ++ "3: Make the table 'quarter-acid' as it only supports insert. But it doesn't require ORC or bucketing."), HIVE_MAX_OPEN_TXNS("hive.max.open.txns", 10, "Maximum number of open transactions. If \n" + "current open transactions reach this limit, future open transaction requests will be \n" + http://git-wip-us.apache.org/repos/asf/hive/blob/b6571eae/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java -- diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java b/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java index 0f08f43..f942479 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java @@ -40,6 +40,7 @@ public final class TransactionalValidationListener extends MetaStorePreEventList // These constants are also imported by org.apache.hadoop.hive.ql.io.AcidUtils. public static final String DEFAULT_TRANSACTIONAL_PROPERTY = "default"; public static final String LEGACY_TRANSACTIONAL_PROPERTY = "legacy"; + public static final String INSERTONLY_TRANSACTIONAL_PROPERTY = "insert_only"; TransactionalValidationListener(Configuration conf) { super(conf); @@ -105,8 +106,11 @@ public final class TransactionalValidationListener extends MetaStorePreEventList } if ("true".equalsIgnoreCase(transactionalValue)) { if (!conformToAcid(newTable)) { -throw new MetaException("The table must be bucketed and stored using an ACID compliant" + -" format (such as ORC)"); +// INSERT_ONLY tables don't have to conform to ACID requirement like ORC or bucketing +if (transactionalPropertiesValue == null || !"insert_only".equalsIgnoreCase(transactionalPropertiesValue)) { + throw new MetaException("The table must be bucketed and stored using an A
hive git commit: HIVE-14878 : integrate MM tables into ACID: add separate ACID type
Repository: hive Updated Branches: refs/heads/hive-14535 9ecffcb1b -> c7fb2dbaa HIVE-14878 : integrate MM tables into ACID: add separate ACID type Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/c7fb2dba Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/c7fb2dba Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/c7fb2dba Branch: refs/heads/hive-14535 Commit: c7fb2dbaa35de53f352a0cc32cfe8312a40fa637 Parents: 9ecffcb Author: Wei Zheng Authored: Tue Oct 18 15:13:20 2016 -0700 Committer: Wei Zheng Committed: Tue Oct 18 15:13:20 2016 -0700 -- .../org/apache/hadoop/hive/conf/HiveConf.java | 10 +- .../TransactionalValidationListener.java| 39 --- .../hadoop/hive/ql/exec/FileSinkOperator.java | 15 ++- .../apache/hadoop/hive/ql/exec/MoveTask.java| 3 +- .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 44 ++- .../hadoop/hive/ql/parse/SemanticAnalyzer.java | 34 +++--- .../queries/clientpositive/mm_insertonly_acid.q | 16 +++ .../clientpositive/mm_insertonly_acid.q.out | 115 +++ 8 files changed, 236 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hive/blob/c7fb2dba/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java -- diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 23314ed..ccc29f8 100644 --- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -1787,10 +1787,12 @@ public class HiveConf extends Configuration { HIVE_TXN_OPERATIONAL_PROPERTIES("hive.txn.operational.properties", 0, "Sets the operational properties that control the appropriate behavior for various\n" -+ "versions of the Hive ACID subsystem. Setting it to zero will turn on the legacy mode\n" -+ "for ACID, while setting it to one will enable a split-update feature found in the newer\n" -+ "version of Hive ACID subsystem. Mostly it is intended to be used as an internal property\n" -+ "for future versions of ACID. (See HIVE-14035 for details.)"), ++ "versions of the Hive ACID subsystem. Mostly it is intended to be used as an internal property\n" ++ "for future versions of ACID. (See HIVE-14035 for details.)\n" ++ "0: Turn on the legacy mode for ACID\n" ++ "1: Enable split-update feature found in the newer version of Hive ACID subsystem\n" ++ "2: Hash-based merge, which combines delta files using GRACE hash join based approach (not implemented)\n" ++ "3: Make the table 'quarter-acid' as it only supports insert. But it doesn't require ORC or bucketing."), HIVE_MAX_OPEN_TXNS("hive.max.open.txns", 10, "Maximum number of open transactions. If \n" + "current open transactions reach this limit, future open transaction requests will be \n" + http://git-wip-us.apache.org/repos/asf/hive/blob/c7fb2dba/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java -- diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java b/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java index 0f08f43..f942479 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/TransactionalValidationListener.java @@ -40,6 +40,7 @@ public final class TransactionalValidationListener extends MetaStorePreEventList // These constants are also imported by org.apache.hadoop.hive.ql.io.AcidUtils. public static final String DEFAULT_TRANSACTIONAL_PROPERTY = "default"; public static final String LEGACY_TRANSACTIONAL_PROPERTY = "legacy"; + public static final String INSERTONLY_TRANSACTIONAL_PROPERTY = "insert_only"; TransactionalValidationListener(Configuration conf) { super(conf); @@ -105,8 +106,11 @@ public final class TransactionalValidationListener extends MetaStorePreEventList } if ("true".equalsIgnoreCase(transactionalValue)) { if (!conformToAcid(newTable)) { -throw new MetaException("The table must be bucketed and stored using an ACID compliant" + -" format (such as ORC)"); +// INSERT_ONLY tables don't have to conform to ACID requirement like ORC or bucketing +if (transactionalPropertiesValue == null || !"insert_only".equalsIgnoreCase(transactionalPropertiesValue)) { + throw new MetaException("The table must be bucketed and stored using an ACID compliant" + +