You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2019/01/16 17:50:36 UTC

[incubator-iceberg] branch master updated: Fix propagation of Hive configs (#79)

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

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d4e919  Fix propagation of Hive configs (#79)
3d4e919 is described below

commit 3d4e919419b74856e8a5f320d0d63c612d815db3
Author: Anton Okolnychyi <ao...@apple.com>
AuthorDate: Wed Jan 16 17:50:31 2019 +0000

    Fix propagation of Hive configs (#79)
---
 .../netflix/iceberg/hive/HiveTableBaseTest.java    | 14 ---------
 hive/src/test/resources/metastore-site.xml         | 35 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java b/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
index f3955e2..41f36bc 100644
--- a/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
+++ b/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
@@ -66,13 +66,7 @@ import static com.netflix.iceberg.types.Types.NestedField.required;
 import static java.nio.file.Files.createTempDirectory;
 import static java.nio.file.attribute.PosixFilePermissions.asFileAttribute;
 import static java.nio.file.attribute.PosixFilePermissions.fromString;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.AUTO_CREATE_ALL;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.COMPACTOR_INITIATOR_ON;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.COMPACTOR_WORKER_THREADS;
 import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.CONNECT_URL_KEY;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.HIVE_SUPPORT_CONCURRENCY;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.HIVE_TXN_MANAGER;
-import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.SCHEMA_VERIFICATION;
 import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.THRIFT_URIS;
 import static org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars.WAREHOUSE;
 
@@ -135,18 +129,10 @@ class HiveTableBaseTest {
 
   private HiveConf hiveConf(Configuration conf, int port) {
     final HiveConf hiveConf = new HiveConf(conf, this.getClass());
-    // Setting AUTO_CREATE_ALL in hadoop config somehow still reverts to false.
-    hiveConf.set(SCHEMA_VERIFICATION.getVarname(), "false");
     hiveConf.set(THRIFT_URIS.getVarname(), "thrift://localhost:" + port);
     hiveConf.set(WAREHOUSE.getVarname(), "file:" + hiveLocalDir.getAbsolutePath());
     hiveConf.set(WAREHOUSE.getHiveName(), "file:" + hiveLocalDir.getAbsolutePath());
     hiveConf.set(CONNECT_URL_KEY.getVarname(), "jdbc:derby:" + getDerbyPath() + ";create=true");
-    hiveConf.set(AUTO_CREATE_ALL.getVarname(), "true");
-    hiveConf.set(HIVE_TXN_MANAGER.getVarname(), "org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager");
-    hiveConf.set(COMPACTOR_INITIATOR_ON.getVarname(), "true");
-    hiveConf.set(COMPACTOR_WORKER_THREADS.getVarname(), "1");
-    hiveConf.set(HIVE_SUPPORT_CONCURRENCY.getVarname(), "true");
-
     return hiveConf;
   }
 
diff --git a/hive/src/test/resources/metastore-site.xml b/hive/src/test/resources/metastore-site.xml
new file mode 100644
index 0000000..542af0a
--- /dev/null
+++ b/hive/src/test/resources/metastore-site.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+       http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<configuration>
+  <property>
+    <name>hive.support.concurrency</name>
+      <value>true</value>
+  </property>
+  <property>
+    <name>metastore.compactor.worker.threads</name>
+      <value>1</value>
+  </property>
+  <property>
+    <name>metastore.compactor.initiator.on</name>
+    <value>true</value>
+  </property>
+  <property>
+    <name>hive.txn.manager</name>
+    <value>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager</value>
+  </property>
+</configuration>