You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/11/15 05:45:05 UTC

hive git commit: HIVE-1841 : datanucleus.fixedDatastore should be true and autoCreate should be false by default (Ashutosh Chauhan via Sushanth Sowmyan)

Repository: hive
Updated Branches:
  refs/heads/master 60842b598 -> f549d4154


HIVE-1841 : datanucleus.fixedDatastore should be true and autoCreate should be false by default (Ashutosh Chauhan via Sushanth Sowmyan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/master
Commit: f549d41542ac2ecb1e6d7b4120af11d1ca2128b3
Parents: 60842b5
Author: Ashutosh Chauhan <ha...@apache.org>
Authored: Thu Nov 12 16:27:02 2015 -0800
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Sat Nov 14 20:44:51 2015 -0800

----------------------------------------------------------------------
 .../test/org/apache/hive/beeline/cli/TestHiveCli.java    |  7 ++++---
 beeline/src/test/resources/hive-site.xml                 | 11 +++++++++++
 .../src/java/org/apache/hadoop/hive/conf/HiveConf.java   |  4 ++--
 data/conf/hive-site.xml                                  | 10 ++++++++++
 data/conf/llap/hive-site.xml                             | 10 ++++++++++
 data/conf/spark/standalone/hive-site.xml                 | 10 ++++++++++
 data/conf/spark/yarn-client/hive-site.xml                | 11 +++++++++++
 data/conf/tez/hive-site.xml                              | 10 ++++++++++
 8 files changed, 68 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java
----------------------------------------------------------------------
diff --git a/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java b/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java
index e1a565b..21ba690 100644
--- a/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java
+++ b/beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java
@@ -17,11 +17,11 @@
  */
 package org.apache.hive.beeline.cli;
 
-import junit.framework.Assert;
 import org.apache.commons.io.IOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -38,7 +38,6 @@ public class TestHiveCli {
   private static final Logger LOG = LoggerFactory.getLogger(TestHiveCli.class.getName());
   private static final int ERRNO_OK = 0;
   private static final int ERRNO_ARGS = 1;
-  private static final int ERRNO_OTHER = 2;
 
   private final static String SOURCE_CONTEXT =
       "create table if not exists test.testSrcTbl(sc1 string);";
@@ -277,9 +276,11 @@ public class TestHiveCli {
 
   @Before
   public void setup() {
+    System.setProperty("datanucleus.fixedDatastore", "false");
+    System.setProperty("datanucleus.autoCreateSchema", "true");
     cli = new HiveCli();
-    initFromFile();
     redirectOutputStream();
+    initFromFile();
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/beeline/src/test/resources/hive-site.xml
----------------------------------------------------------------------
diff --git a/beeline/src/test/resources/hive-site.xml b/beeline/src/test/resources/hive-site.xml
index d2df03c..b2347c7 100644
--- a/beeline/src/test/resources/hive-site.xml
+++ b/beeline/src/test/resources/hive-site.xml
@@ -23,6 +23,17 @@
     <value>true</value>
     <description>Internal marker for test. Used for masking env-dependent values</description>
   </property>
+
+<property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
     <value>jdbc:derby:;databaseName=${test.tmp.dir}/metastore_db;create=true</value>

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/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 01cd731..425c7d9 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -544,9 +544,9 @@ public class HiveConf extends Configuration {
     METASTORE_VALIDATE_CONSTRAINTS("datanucleus.validateConstraints", false,
         "validates existing schema against code. turn this on if you want to verify existing schema"),
     METASTORE_STORE_MANAGER_TYPE("datanucleus.storeManagerType", "rdbms", "metadata store type"),
-    METASTORE_AUTO_CREATE_SCHEMA("datanucleus.autoCreateSchema", true,
+    METASTORE_AUTO_CREATE_SCHEMA("datanucleus.autoCreateSchema", false,
         "creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once"),
-    METASTORE_FIXED_DATASTORE("datanucleus.fixedDatastore", false, ""),
+    METASTORE_FIXED_DATASTORE("datanucleus.fixedDatastore", true, "Dictates whether to allow updates to schema or not."),
     METASTORE_SCHEMA_VERIFICATION("hive.metastore.schema.verification", false,
         "Enforce metastore schema version consistency.\n" +
         "True: Verify that version information stored in metastore matches with one from Hive jars.  Also disable automatic\n" +

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/data/conf/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/hive-site.xml b/data/conf/hive-site.xml
index 1b2359b..d15cc17 100644
--- a/data/conf/hive-site.xml
+++ b/data/conf/hive-site.xml
@@ -59,6 +59,16 @@
 </property>
 
 <property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
+<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
 </property>

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/data/conf/llap/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/llap/hive-site.xml b/data/conf/llap/hive-site.xml
index 77f6945..becb5b2 100644
--- a/data/conf/llap/hive-site.xml
+++ b/data/conf/llap/hive-site.xml
@@ -69,6 +69,16 @@
 </property>
 
 <property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
+<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
 </property>

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/data/conf/spark/standalone/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/spark/standalone/hive-site.xml b/data/conf/spark/standalone/hive-site.xml
index 759f3f7..38d0832 100644
--- a/data/conf/spark/standalone/hive-site.xml
+++ b/data/conf/spark/standalone/hive-site.xml
@@ -45,6 +45,16 @@
 </property>
 
 <property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
+<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
 </property>

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/data/conf/spark/yarn-client/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/spark/yarn-client/hive-site.xml b/data/conf/spark/yarn-client/hive-site.xml
index 40ff688..ada3f3b 100644
--- a/data/conf/spark/yarn-client/hive-site.xml
+++ b/data/conf/spark/yarn-client/hive-site.xml
@@ -45,6 +45,17 @@
 </property>
 
 <property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
+
+<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
 </property>

http://git-wip-us.apache.org/repos/asf/hive/blob/f549d415/data/conf/tez/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/tez/hive-site.xml b/data/conf/tez/hive-site.xml
index 5074427..d008ad1 100644
--- a/data/conf/tez/hive-site.xml
+++ b/data/conf/tez/hive-site.xml
@@ -63,6 +63,16 @@
 </property>
 
 <property>
+  <name>datanucleus.autoCreateSchema</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>datanucleus.fixedDatastore</name>
+  <value>false</value>
+</property>
+
+<property>
   <name>hive.exec.local.scratchdir</name>
   <value>${test.tmp.dir}/localscratchdir/</value>
   <description>Local scratch space for Hive jobs</description>