diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index f651c4b1fe63..2c0e74cd7770 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,4 +1,4 @@ -Release Notes - Hive - Version 3.1.2.fk.11 +Release Notes - Hive - Version 3.1.2.fk.12 ** Sub-task * [HIVE-21290] - Restore historical way of handling timestamps in Parquet while keeping the new semantics at the same time diff --git a/accumulo-handler/pom.xml b/accumulo-handler/pom.xml index 6c1c413eb86c..a31007421eaa 100644 --- a/accumulo-handler/pom.xml +++ b/accumulo-handler/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/beeline/pom.xml b/beeline/pom.xml index 1239839ba2ac..712a46e3b9c7 100644 --- a/beeline/pom.xml +++ b/beeline/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/classification/pom.xml b/classification/pom.xml index 3a2e65acc923..303b1b452e1d 100644 --- a/classification/pom.xml +++ b/classification/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/cli/pom.xml b/cli/pom.xml index 762df16d76a6..90a398357d49 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/common/pom.xml b/common/pom.xml index 81f37332b57c..73830028d6b3 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/contrib/pom.xml b/contrib/pom.xml index cecd6691f5b1..c3ee8da8717f 100644 --- a/contrib/pom.xml +++ b/contrib/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/druid-handler/pom.xml b/druid-handler/pom.xml index 0f1d011b57ea..3ee68ed2bae8 100644 --- a/druid-handler/pom.xml +++ b/druid-handler/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hbase-handler/pom.xml b/hbase-handler/pom.xml index b3873e7bdbe8..2ba5b3d144cf 100644 --- a/hbase-handler/pom.xml +++ b/hbase-handler/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/core/pom.xml b/hcatalog/core/pom.xml index 6d486fa13028..08c156ee2b4e 100644 --- a/hcatalog/core/pom.xml +++ b/hcatalog/core/pom.xml @@ -25,7 +25,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/hcatalog-pig-adapter/pom.xml b/hcatalog/hcatalog-pig-adapter/pom.xml index 1a9df6236b96..3e73d7223bb6 100644 --- a/hcatalog/hcatalog-pig-adapter/pom.xml +++ b/hcatalog/hcatalog-pig-adapter/pom.xml @@ -25,7 +25,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/pom.xml b/hcatalog/pom.xml index bd5fcdb8c9da..1edea7e6d1de 100644 --- a/hcatalog/pom.xml +++ b/hcatalog/pom.xml @@ -24,7 +24,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/server-extensions/pom.xml b/hcatalog/server-extensions/pom.xml index 414412d573f1..a0962ceb8cc5 100644 --- a/hcatalog/server-extensions/pom.xml +++ b/hcatalog/server-extensions/pom.xml @@ -25,7 +25,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/streaming/pom.xml b/hcatalog/streaming/pom.xml index a08fc98069e2..42969013621d 100644 --- a/hcatalog/streaming/pom.xml +++ b/hcatalog/streaming/pom.xml @@ -20,7 +20,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/hcatalog/webhcat/java-client/pom.xml b/hcatalog/webhcat/java-client/pom.xml index 05ccf21b17e4..0fcf13563b95 100644 --- a/hcatalog/webhcat/java-client/pom.xml +++ b/hcatalog/webhcat/java-client/pom.xml @@ -25,7 +25,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/hcatalog/webhcat/svr/pom.xml b/hcatalog/webhcat/svr/pom.xml index 1ee1beacad2b..3973f7df2071 100644 --- a/hcatalog/webhcat/svr/pom.xml +++ b/hcatalog/webhcat/svr/pom.xml @@ -25,7 +25,7 @@ org.apache.hive.hcatalog hive-hcatalog - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/hplsql/pom.xml b/hplsql/pom.xml index 3bd7c05fe862..30c42dcf4ff1 100644 --- a/hplsql/pom.xml +++ b/hplsql/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-serde/pom.xml b/itests/custom-serde/pom.xml index c3d853d6cf58..e49b2a48d54f 100644 --- a/itests/custom-serde/pom.xml +++ b/itests/custom-serde/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-udfs/pom.xml b/itests/custom-udfs/pom.xml index 4ef50400bc4d..2e19b5f0548a 100644 --- a/itests/custom-udfs/pom.xml +++ b/itests/custom-udfs/pom.xml @@ -19,7 +19,7 @@ limitations under the License. org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-udfs/udf-classloader-udf1/pom.xml b/itests/custom-udfs/udf-classloader-udf1/pom.xml index 65cb27a45641..ce8aafce7bdb 100644 --- a/itests/custom-udfs/udf-classloader-udf1/pom.xml +++ b/itests/custom-udfs/udf-classloader-udf1/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it-custom-udfs - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-udfs/udf-classloader-udf2/pom.xml b/itests/custom-udfs/udf-classloader-udf2/pom.xml index e44039a43116..55d05a03d30f 100644 --- a/itests/custom-udfs/udf-classloader-udf2/pom.xml +++ b/itests/custom-udfs/udf-classloader-udf2/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it-custom-udfs - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-udfs/udf-classloader-util/pom.xml b/itests/custom-udfs/udf-classloader-util/pom.xml index 3a03f0e1e158..ef50b52904d6 100644 --- a/itests/custom-udfs/udf-classloader-util/pom.xml +++ b/itests/custom-udfs/udf-classloader-util/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it-custom-udfs - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/custom-udfs/udf-vectorized-badexample/pom.xml b/itests/custom-udfs/udf-vectorized-badexample/pom.xml index f6d511998cb2..ff4013040ba7 100644 --- a/itests/custom-udfs/udf-vectorized-badexample/pom.xml +++ b/itests/custom-udfs/udf-vectorized-badexample/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it-custom-udfs - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hcatalog-unit/pom.xml b/itests/hcatalog-unit/pom.xml index b718d8953b39..13202e87df0b 100644 --- a/itests/hcatalog-unit/pom.xml +++ b/itests/hcatalog-unit/pom.xml @@ -25,7 +25,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hive-blobstore/pom.xml b/itests/hive-blobstore/pom.xml index e4baecb6f4b1..3075e320db89 100644 --- a/itests/hive-blobstore/pom.xml +++ b/itests/hive-blobstore/pom.xml @@ -20,7 +20,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hive-jmh/pom.xml b/itests/hive-jmh/pom.xml index cfe1a7028476..13706765d719 100644 --- a/itests/hive-jmh/pom.xml +++ b/itests/hive-jmh/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hive-minikdc/pom.xml b/itests/hive-minikdc/pom.xml index bc4b2ef096c3..bb592a018ed6 100644 --- a/itests/hive-minikdc/pom.xml +++ b/itests/hive-minikdc/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hive-unit-hadoop2/pom.xml b/itests/hive-unit-hadoop2/pom.xml index 19199fdb1997..c6b0caccf06e 100644 --- a/itests/hive-unit-hadoop2/pom.xml +++ b/itests/hive-unit-hadoop2/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/hive-unit/pom.xml b/itests/hive-unit/pom.xml index c03269fa37f6..74c18096cc84 100644 --- a/itests/hive-unit/pom.xml +++ b/itests/hive-unit/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/pom.xml b/itests/pom.xml index 85df2611eccd..b5cf222628ad 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -19,14 +19,14 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml org.apache.hive hive-it pom - 3.1.2.fk.11 + 3.1.2.fk.12 Hive Integration - Parent diff --git a/itests/qtest-accumulo/pom.xml b/itests/qtest-accumulo/pom.xml index 664d57294cd0..2b5c192c1b33 100644 --- a/itests/qtest-accumulo/pom.xml +++ b/itests/qtest-accumulo/pom.xml @@ -20,7 +20,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/qtest-druid/pom.xml b/itests/qtest-druid/pom.xml index 2741f0d329c6..3d6e63f55eb6 100644 --- a/itests/qtest-druid/pom.xml +++ b/itests/qtest-druid/pom.xml @@ -23,7 +23,7 @@ hive-it org.apache.hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml 4.0.0 diff --git a/itests/qtest-spark/pom.xml b/itests/qtest-spark/pom.xml index bc09b428e20f..292095126cff 100644 --- a/itests/qtest-spark/pom.xml +++ b/itests/qtest-spark/pom.xml @@ -20,7 +20,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml index 567550343891..3eb6666729b8 100644 --- a/itests/qtest/pom.xml +++ b/itests/qtest/pom.xml @@ -20,7 +20,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/test-serde/pom.xml b/itests/test-serde/pom.xml index cdafd5d10237..3bc17bbd3327 100644 --- a/itests/test-serde/pom.xml +++ b/itests/test-serde/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/itests/util/pom.xml b/itests/util/pom.xml index 56364b127b76..441d3df0d41a 100644 --- a/itests/util/pom.xml +++ b/itests/util/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive-it - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/jdbc-handler/pom.xml b/jdbc-handler/pom.xml index 269d0c951581..1a72076c2eb4 100644 --- a/jdbc-handler/pom.xml +++ b/jdbc-handler/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/jdbc/pom.xml b/jdbc/pom.xml index ca11e553025d..c877f81ac99c 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/kryo-registrator/pom.xml b/kryo-registrator/pom.xml index 04e87eede838..98836c2536cd 100644 --- a/kryo-registrator/pom.xml +++ b/kryo-registrator/pom.xml @@ -20,7 +20,7 @@ hive org.apache.hive - 3.1.2.fk.11 + 3.1.2.fk.12 hive-kryo-registrator diff --git a/llap-client/pom.xml b/llap-client/pom.xml index 2f3927880b58..09192915d9e5 100644 --- a/llap-client/pom.xml +++ b/llap-client/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/llap-common/pom.xml b/llap-common/pom.xml index 951761f87e89..13d7fbf9cd5f 100644 --- a/llap-common/pom.xml +++ b/llap-common/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/llap-ext-client/pom.xml b/llap-ext-client/pom.xml index 36ccb8f848a2..3104736258b2 100644 --- a/llap-ext-client/pom.xml +++ b/llap-ext-client/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/llap-server/pom.xml b/llap-server/pom.xml index e44565bd75e0..eceea080e0f1 100644 --- a/llap-server/pom.xml +++ b/llap-server/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/llap-tez/pom.xml b/llap-tez/pom.xml index 87cc34045fc8..33e13c39ecb0 100644 --- a/llap-tez/pom.xml +++ b/llap-tez/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/metastore/pom.xml b/metastore/pom.xml index 8ccd442d21d4..ebb19ee6dc55 100644 --- a/metastore/pom.xml +++ b/metastore/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/packaging/pom.xml b/packaging/pom.xml index 64ee0a8bd2b5..77081768dd73 100644 --- a/packaging/pom.xml +++ b/packaging/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/pom.xml b/pom.xml index 13c06c5659f3..6e1199ca9ed8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 pom Hive diff --git a/ql/pom.xml b/ql/pom.xml index 4d62bdad4a2b..3ad2ecdef3e3 100644 --- a/ql/pom.xml +++ b/ql/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/serde/pom.xml b/serde/pom.xml index b1281fac2307..b10dc1d3a706 100644 --- a/serde/pom.xml +++ b/serde/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/service-rpc/pom.xml b/service-rpc/pom.xml index 8bdf0dde6fd3..f2d9c602c689 100644 --- a/service-rpc/pom.xml +++ b/service-rpc/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/service/pom.xml b/service/pom.xml index 6c89a791f20e..7f6167be1dff 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/shims/0.23/pom.xml b/shims/0.23/pom.xml index 49577f648a5d..303083e65d7c 100644 --- a/shims/0.23/pom.xml +++ b/shims/0.23/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/shims/aggregator/pom.xml b/shims/aggregator/pom.xml index 66e301303a5d..e0488074cedd 100644 --- a/shims/aggregator/pom.xml +++ b/shims/aggregator/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/shims/common/pom.xml b/shims/common/pom.xml index c23f7efcde91..f42d529e04f6 100644 --- a/shims/common/pom.xml +++ b/shims/common/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/shims/pom.xml b/shims/pom.xml index 6817ef8823f5..99d9083871d2 100644 --- a/shims/pom.xml +++ b/shims/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/shims/scheduler/pom.xml b/shims/scheduler/pom.xml index d1987610bcbd..a5df330ffac3 100644 --- a/shims/scheduler/pom.xml +++ b/shims/scheduler/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../../pom.xml diff --git a/spark-client/pom.xml b/spark-client/pom.xml index 9d6a93ebd2e9..4ae6adc1faef 100644 --- a/spark-client/pom.xml +++ b/spark-client/pom.xml @@ -22,14 +22,14 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 org.apache.hive hive-spark-client jar Hive Spark Remote Client - 3.1.2.fk.11 + 3.1.2.fk.12 .. diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml index 923884ec505b..d3fcb13f632a 100644 --- a/standalone-metastore/pom.xml +++ b/standalone-metastore/pom.xml @@ -25,7 +25,7 @@ org.apache.hive hive-standalone-metastore - 3.1.2.fk.11 + 3.1.2.fk.12 jar Hive Standalone Metastore diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp index 1c1b3ce5eeb6..875e272eb4aa 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp +++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp @@ -61,6 +61,10 @@ hive_metastoreConstants::hive_metastoreConstants() { TABLE_BUCKETING_VERSION = "bucketing_version"; + EXPECTED_PARAMETER_KEY = "expected_parameter_key"; + + EXPECTED_PARAMETER_VALUE = "expected_parameter_value"; + } }}} // namespace diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h index 1f062530e4d8..4cffc9491fb2 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h +++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h @@ -40,6 +40,8 @@ class hive_metastoreConstants { std::string TABLE_NO_AUTO_COMPACT; std::string TABLE_TRANSACTIONAL_PROPERTIES; std::string TABLE_BUCKETING_VERSION; + std::string EXPECTED_PARAMETER_KEY; + std::string EXPECTED_PARAMETER_VALUE; }; extern const hive_metastoreConstants g_hive_metastore_constants; diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java index 2ee81df1dc11..76be19a7d0e9 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java @@ -86,4 +86,8 @@ public static final String TABLE_BUCKETING_VERSION = "bucketing_version"; + public static final String EXPECTED_PARAMETER_KEY = "expected_parameter_key"; + + public static final String EXPECTED_PARAMETER_VALUE = "expected_parameter_value"; + } diff --git a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php index 84f7e3320c87..8c65e346a279 100644 --- a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php +++ b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -31377,6 +31377,8 @@ final class Constant extends \Thrift\Type\TConstant { static protected $TABLE_NO_AUTO_COMPACT; static protected $TABLE_TRANSACTIONAL_PROPERTIES; static protected $TABLE_BUCKETING_VERSION; + static protected $EXPECTED_PARAMETER_KEY; + static protected $EXPECTED_PARAMETER_VALUE; static protected function init_DDL_TIME() { return "transient_lastDdlTime"; @@ -31477,6 +31479,14 @@ static protected function init_TABLE_TRANSACTIONAL_PROPERTIES() { static protected function init_TABLE_BUCKETING_VERSION() { return "bucketing_version"; } + + static protected function init_EXPECTED_PARAMETER_KEY() { + return "expected_parameter_key"; + } + + static protected function init_EXPECTED_PARAMETER_VALUE() { + return "expected_parameter_value"; + } } diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py index c27745a6078e..261b3bf82aa1 100644 --- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py +++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py @@ -34,3 +34,5 @@ TABLE_NO_AUTO_COMPACT = "no_auto_compaction" TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties" TABLE_BUCKETING_VERSION = "bucketing_version" +EXPECTED_PARAMETER_KEY = "expected_parameter_key" +EXPECTED_PARAMETER_VALUE = "expected_parameter_value" diff --git a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb index 9e6cedd43d72..8cc22cfcaceb 100644 --- a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb +++ b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb @@ -57,3 +57,7 @@ TABLE_BUCKETING_VERSION = %q"bucketing_version" +EXPECTED_PARAMETER_KEY = %q"expected_parameter_key" + +EXPECTED_PARAMETER_VALUE = %q"expected_parameter_value" + diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java index f328ad181558..f010f0d2cca8 100644 --- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java +++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java @@ -49,6 +49,7 @@ import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; +import javax.jdo.Constants; import java.io.IOException; import java.net.URI; import java.util.ArrayList; @@ -146,7 +147,17 @@ public void alterTable(RawStore msdb, Warehouse wh, String catName, String dbnam rename = true; } - msdb.openTransaction(); + String expectedKey = environmentContext != null && environmentContext.getProperties() != null ? + environmentContext.getProperties().get(hive_metastoreConstants.EXPECTED_PARAMETER_KEY) : null; + String expectedValue = environmentContext != null && environmentContext.getProperties() != null ? + environmentContext.getProperties().get(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE) : null; + + if (expectedKey != null) { + // If we have to check the expected state of the table we have to prevent nonrepeatable reads. + msdb.openTransaction(Constants.TX_REPEATABLE_READ); + } else { + msdb.openTransaction(); + } // get old table oldt = msdb.getTable(catName, dbname, name); if (oldt == null) { @@ -154,6 +165,12 @@ public void alterTable(RawStore msdb, Warehouse wh, String catName, String dbnam Warehouse.getCatalogQualifiedTableName(catName, dbname, name) + " doesn't exist"); } + if (expectedKey != null && expectedValue != null + && !expectedValue.equals(oldt.getParameters().get(expectedKey))) { + throw new MetaException("The table has been modified. The parameter value for key '" + expectedKey + "' is '" + + oldt.getParameters().get(expectedKey) + "'. The expected was value was '" + expectedValue + "'"); + } + if (oldt.getPartitionKeysSize() != 0) { isPartitionedTable = true; } diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 7bf5cef84197..cc2588747164 100644 --- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -703,17 +703,31 @@ public void shutdown() { } /** - * Opens a new one or the one already created Every call of this function must - * have corresponding commit or rollback function call + * Opens a new one or the one already created. Every call of this function must + * have corresponding commit or rollback function call. * * @return an active transaction */ - @Override public boolean openTransaction() { + return openTransaction(null); + } + + /** + * Opens a new one or the one already created. Every call of this function must + * have corresponding commit or rollback function call. + * + * @param isolationLevel The transaction isolation level. Only possible to set on the first call. + * @return an active transaction + */ + @Override + public boolean openTransaction(String isolationLevel) { openTrasactionCalls++; if (openTrasactionCalls == 1) { currentTransaction = pm.currentTransaction(); + if (isolationLevel != null) { + currentTransaction.setIsolationLevel(isolationLevel); + } currentTransaction.begin(); transactionStatus = TXN_STATUS.OPEN; } else { @@ -723,10 +737,16 @@ public boolean openTransaction() { throw new RuntimeException("openTransaction called in an interior" + " transaction scope, but currentTransaction is not active."); } + + // Can not change the isolation level on an already open transaction + if (isolationLevel != null && !isolationLevel.equals(currentTransaction.getIsolationLevel())) { + throw new RuntimeException("Can not set isolation level on an open transaction"); + } } boolean result = currentTransaction.isActive(); - debugLog("Open transaction: count = " + openTrasactionCalls + ", isActive = " + result); + debugLog("Open transaction: count = " + openTrasactionCalls + ", isActive = " + result + ", isolationLevel = " + + currentTransaction.getIsolationLevel()); return result; } diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java index f350aa9fd7c0..a6ffcf417e92 100644 --- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java +++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java @@ -104,14 +104,24 @@ public interface RawStore extends Configurable { void shutdown(); /** - * Opens a new one or the one already created Every call of this function must - * have corresponding commit or rollback function call + * Opens a new one or the one already created. Every call of this function must + * have corresponding commit or rollback function call. * * @return an active transaction */ - boolean openTransaction(); + /** + * Opens a new one or the one already created. Every call of this function must + * have corresponding commit or rollback function call. + * + * @param isolationLevel The transaction isolation level. Only possible to set on the first call. + * @return an active transaction + */ + default boolean openTransaction(String isolationLevel) { + throw new UnsupportedOperationException("Setting isolation level for this Store is not supported"); + } + /** * if this is the commit of the first open call then an actual commit is * called. diff --git a/standalone-metastore/src/main/thrift/hive_metastore.thrift b/standalone-metastore/src/main/thrift/hive_metastore.thrift index ad1dc1f76966..c08a03c0e1a9 100644 --- a/standalone-metastore/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/src/main/thrift/hive_metastore.thrift @@ -2243,3 +2243,6 @@ const string TABLE_NO_AUTO_COMPACT = "no_auto_compaction", const string TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties", const string TABLE_BUCKETING_VERSION = "bucketing_version", +// Keys for alter table environment context parameters +const string EXPECTED_PARAMETER_KEY = "expected_parameter_key", +const string EXPECTED_PARAMETER_VALUE = "expected_parameter_value", \ No newline at end of file diff --git a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java index c1eff55b11c3..a2ab9e807f37 100644 --- a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java +++ b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java @@ -23,7 +23,9 @@ import org.apache.hadoop.hive.metastore.ColumnType; import org.apache.hadoop.hive.metastore.IMetaStoreClient; import org.apache.hadoop.hive.metastore.MetaStoreTestUtils; +import org.apache.hadoop.hive.metastore.RawStore; import org.apache.hadoop.hive.metastore.TableType; +import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; import org.apache.hadoop.hive.metastore.api.Catalog; @@ -33,6 +35,7 @@ import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; +import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; @@ -65,15 +68,21 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; import static org.apache.hadoop.hive.metastore.Warehouse.DEFAULT_CATALOG_NAME; import static org.apache.hadoop.hive.metastore.Warehouse.DEFAULT_DATABASE_NAME; +import static org.junit.Assert.assertTrue; /** * Test class for IMetaStoreClient API. Testing the Table related functions for metadata @@ -1075,6 +1084,99 @@ public void testAlterTableAlreadyExists() throws Exception { } } + @Test + public void testAlterTableExpectedPropertyMatch() throws Exception { + Table originalTable = testTables[0]; + + EnvironmentContext context = new EnvironmentContext(); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_KEY, "transient_lastDdlTime"); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE, + originalTable.getParameters().get("transient_lastDdlTime")); + + client.alter_table(originalTable.getCatName(), originalTable.getDbName(), originalTable.getTableName(), + originalTable, context); + } + + @Test(expected = MetaException.class) + public void testAlterTableExpectedPropertyDifferent() throws Exception { + Table originalTable = testTables[0]; + + EnvironmentContext context = new EnvironmentContext(); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_KEY, "transient_lastDdlTime"); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE, "alma"); + + client.alter_table(originalTable.getCatName(), originalTable.getDbName(), originalTable.getTableName(), + originalTable, context); + } + + /** + * This tests ensures that concurrent Iceberg commits will fail. Acceptable as a first sanity check. + *

+ * I have not found a good way to check that HMS side database commits are parallel in the + * {@link org.apache.hadoop.hive.metastore.HiveAlterHandler#alterTable(RawStore, Warehouse, String, String, String, Table, EnvironmentContext)} + * call, but this test could be used to manually ensure that using breakpoints. + */ + @Test + public void testAlterTableExpectedPropertyConcurrent() throws Exception { + Table originalTable = testTables[0]; + + originalTable.getParameters().put("snapshot", "0"); + client.alter_table(originalTable.getCatName(), originalTable.getDbName(), originalTable.getTableName(), + originalTable, null); + + ExecutorService threads = null; + try { + threads = Executors.newFixedThreadPool(2); + for (int i = 0; i < 3; i++) { + EnvironmentContext context = new EnvironmentContext(); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_KEY, "snapshot"); + context.putToProperties(hive_metastoreConstants.EXPECTED_PARAMETER_VALUE, String.valueOf(i)); + + Table newTable = originalTable.deepCopy(); + newTable.getParameters().put("snapshot", String.valueOf(i + 1)); + + IMetaStoreClient client1 = metaStore.getClient(); + IMetaStoreClient client2 = metaStore.getClient(); + + Collection> concurrentTasks = new ArrayList<>(2); + concurrentTasks.add(alterTask(client1, newTable, context)); + concurrentTasks.add(alterTask(client2, newTable, context)); + + Collection> results = threads.invokeAll(concurrentTasks); + + boolean foundSuccess = false; + boolean foundFailure = false; + + for (Future result : results) { + if (result.get()) { + foundSuccess = true; + } else { + foundFailure = true; + } + } + + assertTrue("At least one success is expected", foundSuccess); + assertTrue("At least one failure is expected", foundFailure); + } + } finally { + if (threads != null) { + threads.shutdown(); + } + } + } + + private Callable alterTask(IMetaStoreClient hmsClient, Table newTable, EnvironmentContext context) { + return () -> { + try { + hmsClient.alter_table(newTable.getCatName(), newTable.getDbName(), newTable.getTableName(), + newTable, context); + } catch (Throwable e) { + return false; + } + return true; + }; + } + @Test public void tablesInOtherCatalogs() throws TException, URISyntaxException { String catName = "create_etc_tables_in_other_catalogs"; diff --git a/streaming/pom.xml b/streaming/pom.xml index 52919fc5617b..7c7fcdffe2d5 100644 --- a/streaming/pom.xml +++ b/streaming/pom.xml @@ -20,7 +20,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/testutils/pom.xml b/testutils/pom.xml index 8b8e76f87cde..ec981e77b4a2 100644 --- a/testutils/pom.xml +++ b/testutils/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml diff --git a/upgrade-acid/pom.xml b/upgrade-acid/pom.xml index 313cd2a1a3c2..d0d554a9066d 100644 --- a/upgrade-acid/pom.xml +++ b/upgrade-acid/pom.xml @@ -26,7 +26,7 @@ 4.0.0 org.apache.hive - 3.1.2.fk.11 + 3.1.2.fk.12 hive-upgrade-acid Hive Upgrade Acid jar diff --git a/vector-code-gen/pom.xml b/vector-code-gen/pom.xml index be68ae1126d8..93401a91ba01 100644 --- a/vector-code-gen/pom.xml +++ b/vector-code-gen/pom.xml @@ -19,7 +19,7 @@ org.apache.hive hive - 3.1.2.fk.11 + 3.1.2.fk.12 ../pom.xml