hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject hive git commit: HIVE-17731 : add a backward compat option for external users to HIVE-11985 (Sergey Shelukhin, reviewed by Jesus Camacho Rodriguez)
Date Mon, 09 Oct 2017 19:39:48 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2 14d2ec2eb -> 034da21f3


HIVE-17731 : add a backward compat option for external users to HIVE-11985 (Sergey Shelukhin,
reviewed by Jesus Camacho Rodriguez)


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

Branch: refs/heads/branch-2
Commit: 034da21f39d22f354906048c4060e475ce718031
Parents: 14d2ec2
Author: sergey <sershe@apache.org>
Authored: Mon Oct 9 12:34:33 2017 -0700
Committer: sergey <sershe@apache.org>
Committed: Mon Oct 9 12:35:55 2017 -0700

----------------------------------------------------------------------
 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java | 6 ++++++
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java | 1 +
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/034da21f/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 f43db60..62eabbc 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -1220,6 +1220,12 @@ public class HiveConf extends Configuration {
         "org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe",
         "SerDes retrieving schema from metastore. This is an internal parameter."),
 
+    @Deprecated
+    HIVE_LEGACY_SCHEMA_FOR_ALL_SERDES("hive.legacy.schema.for.all.serdes",
+        false,
+        "A backward compatibility setting for external metastore users that do not handle
\n" +
+        SERDESUSINGMETASTOREFORSCHEMA.varname + " correctly. This may be removed at any time."),
+
     HIVEHISTORYFILELOC("hive.querylog.location",
         "${system:java.io.tmpdir}" + File.separator + "${system:user.name}",
         "Location of Hive run time structured log file"),

http://git-wip-us.apache.org/repos/asf/hive/blob/034da21f/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
index 171f944..e0e57c6 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java
@@ -956,6 +956,7 @@ public class Table implements Serializable {
   public static boolean shouldStoreFieldsInMetastore(
       HiveConf conf, String serdeLib, Map<String, String> tableParams) {
     if (hasMetastoreBasedSchema(conf, serdeLib))  return true;
+    if (HiveConf.getBoolVar(conf, ConfVars.HIVE_LEGACY_SCHEMA_FOR_ALL_SERDES)) return true;
     // Table may or may not be using metastore. Only the SerDe can tell us.
     AbstractSerDe deserializer = null;
     try {


Mime
View raw message