Repository: hive
Updated Branches:
  refs/heads/master 9cfc15a86 -> 154a68655


HIVE-19041 : Thrift deserialization of Partition objects should intern fields 
(Vihang Karajgaonkar reviewed by Sahil Takiar and Misha Dmitriev)


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

Branch: refs/heads/master
Commit: 154a6865557326292e1be94200f3f74c2acacb8a
Parents: 9cfc15a
Author: Vihang Karajgaonkar <[email protected]>
Authored: Thu May 3 10:25:16 2018 -0700
Committer: Vihang Karajgaonkar <[email protected]>
Committed: Fri May 11 11:31:24 2018 -0700

----------------------------------------------------------------------
 standalone-metastore/pom.xml                    |  2 ++
 .../metastore/api/ColumnStatisticsDesc.java     | 28 +++++++--------
 .../hive/metastore/api/ColumnStatisticsObj.java | 20 +++++------
 .../hadoop/hive/metastore/api/FieldSchema.java  | 12 +++----
 .../hadoop/hive/metastore/api/Partition.java    | 16 ++++-----
 .../hadoop/hive/metastore/api/SerDeInfo.java    | 24 ++++++-------
 .../hive/metastore/api/StorageDescriptor.java   | 16 ++++-----
 .../src/main/resources/thrift-replacements.txt  | 37 ++++++++++++++++++++
 8 files changed, 97 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index c9eec9d..5c536c9 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -399,6 +399,8 @@
                     <include>Partition.java</include>
                     <include>SerDeInfo.java</include>
                     <include>StorageDescriptor.java</include>
+                    <include>ColumnStatisticsDesc.java</include>
+                    <include>ColumnStatisticsObj.java</include>
                   </includes>
                   
<tokenValueMap>${basedir}/src/main/resources/thrift-replacements.txt</tokenValueMap>
                   <regex>true</regex>

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
index 0e70758..44a57f2 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
@@ -166,8 +166,8 @@ import org.slf4j.LoggerFactory;
     this();
     this.isTblLevel = isTblLevel;
     setIsTblLevelIsSet(true);
-    this.dbName = dbName;
-    this.tableName = tableName;
+    this.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName);
+    this.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName);
   }
 
   /**
@@ -177,17 +177,17 @@ import org.slf4j.LoggerFactory;
     __isset_bitfield = other.__isset_bitfield;
     this.isTblLevel = other.isTblLevel;
     if (other.isSetDbName()) {
-      this.dbName = other.dbName;
+      this.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.dbName);
     }
     if (other.isSetTableName()) {
-      this.tableName = other.tableName;
+      this.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.tableName);
     }
     if (other.isSetPartName()) {
       this.partName = other.partName;
     }
     this.lastAnalyzed = other.lastAnalyzed;
     if (other.isSetCatName()) {
-      this.catName = other.catName;
+      this.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.catName);
     }
   }
 
@@ -234,7 +234,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setDbName(String dbName) {
-    this.dbName = dbName;
+    this.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName);
   }
 
   public void unsetDbName() {
@@ -257,7 +257,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setTableName(String tableName) {
-    this.tableName = tableName;
+    this.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName);
   }
 
   public void unsetTableName() {
@@ -325,7 +325,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setCatName(String catName) {
-    this.catName = catName;
+    this.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(catName);
   }
 
   public void unsetCatName() {
@@ -750,7 +750,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // DB_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.dbName = iprot.readString();
+              struct.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setDbNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -758,7 +758,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 3: // TABLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.tableName = iprot.readString();
+              struct.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setTableNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -782,7 +782,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 6: // CAT_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.catName = iprot.readString();
+              struct.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setCatNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -880,9 +880,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol iprot = (TTupleProtocol) prot;
       struct.isTblLevel = iprot.readBool();
       struct.setIsTblLevelIsSet(true);
-      struct.dbName = iprot.readString();
+      struct.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
       struct.setDbNameIsSet(true);
-      struct.tableName = iprot.readString();
+      struct.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
       struct.setTableNameIsSet(true);
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
@@ -894,7 +894,7 @@ import org.slf4j.LoggerFactory;
         struct.setLastAnalyzedIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.catName = iprot.readString();
+        struct.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setCatNameIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
index 9762478..6f9a57f 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
@@ -139,8 +139,8 @@ import org.slf4j.LoggerFactory;
     ColumnStatisticsData statsData)
   {
     this();
-    this.colName = colName;
-    this.colType = colType;
+    this.colName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colName);
+    this.colType = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colType);
     this.statsData = statsData;
   }
 
@@ -149,10 +149,10 @@ import org.slf4j.LoggerFactory;
    */
   public ColumnStatisticsObj(ColumnStatisticsObj other) {
     if (other.isSetColName()) {
-      this.colName = other.colName;
+      this.colName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colName);
     }
     if (other.isSetColType()) {
-      this.colType = other.colType;
+      this.colType = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colType);
     }
     if (other.isSetStatsData()) {
       this.statsData = new ColumnStatisticsData(other.statsData);
@@ -175,7 +175,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setColName(String colName) {
-    this.colName = colName;
+    this.colName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colName);
   }
 
   public void unsetColName() {
@@ -198,7 +198,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setColType(String colType) {
-    this.colType = colType;
+    this.colType = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colType);
   }
 
   public void unsetColType() {
@@ -503,7 +503,7 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // COL_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.colName = iprot.readString();
+              struct.colName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setColNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -511,7 +511,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // COL_TYPE
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.colType = iprot.readString();
+              struct.colType = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setColTypeIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -579,9 +579,9 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, 
ColumnStatisticsObj struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.colName = iprot.readString();
+      struct.colName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
       struct.setColNameIsSet(true);
-      struct.colType = iprot.readString();
+      struct.colType = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
       struct.setColTypeIsSet(true);
       struct.statsData = new ColumnStatisticsData();
       struct.statsData.read(iprot);

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
index ff63408..8f00fbd 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
@@ -491,7 +491,7 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.name = iprot.readString();
+              struct.name = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -499,7 +499,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // TYPE
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.type = iprot.readString();
+              struct.type = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setTypeIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -507,7 +507,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 3: // COMMENT
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.comment = iprot.readString();
+              struct.comment = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setCommentIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -585,15 +585,15 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
-        struct.name = iprot.readString();
+        struct.name = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setNameIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.type = iprot.readString();
+        struct.type = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setTypeIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.comment = iprot.readString();
+        struct.comment = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setCommentIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
index c58e1cb..51f809a 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
@@ -231,7 +231,7 @@ import org.slf4j.LoggerFactory;
       this.privileges = new PrincipalPrivilegeSet(other.privileges);
     }
     if (other.isSetCatName()) {
-      this.catName = other.catName;
+      this.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.catName);
     }
   }
 
@@ -467,7 +467,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setCatName(String catName) {
-    this.catName = catName;
+    this.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(catName);
   }
 
   public void unsetCatName() {
@@ -1029,7 +1029,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // DB_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.dbName = iprot.readString();
+              struct.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setDbNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1037,7 +1037,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 3: // TABLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.tableName = iprot.readString();
+              struct.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setTableNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1099,7 +1099,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 9: // CAT_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.catName = iprot.readString();
+              struct.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setCatNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1284,11 +1284,11 @@ import org.slf4j.LoggerFactory;
         struct.setValuesIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.dbName = iprot.readString();
+        struct.dbName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setDbNameIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.tableName = iprot.readString();
+        struct.tableName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setTableNameIsSet(true);
       }
       if (incoming.get(3)) {
@@ -1325,7 +1325,7 @@ import org.slf4j.LoggerFactory;
         struct.setPrivilegesIsSet(true);
       }
       if (incoming.get(8)) {
-        struct.catName = iprot.readString();
+        struct.catName = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setCatNameIsSet(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
index 71957f7..671c43e 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
@@ -197,10 +197,10 @@ import org.slf4j.LoggerFactory;
       this.description = other.description;
     }
     if (other.isSetSerializerClass()) {
-      this.serializerClass = other.serializerClass;
+      this.serializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.serializerClass);
     }
     if (other.isSetDeserializerClass()) {
-      this.deserializerClass = other.deserializerClass;
+      this.deserializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.deserializerClass);
     }
     if (other.isSetSerdeType()) {
       this.serdeType = other.serdeType;
@@ -330,7 +330,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setSerializerClass(String serializerClass) {
-    this.serializerClass = serializerClass;
+    this.serializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(serializerClass);
   }
 
   public void unsetSerializerClass() {
@@ -353,7 +353,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public void setDeserializerClass(String deserializerClass) {
-    this.deserializerClass = deserializerClass;
+    this.deserializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(deserializerClass);
   }
 
   public void unsetDeserializerClass() {
@@ -842,7 +842,7 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.name = iprot.readString();
+              struct.name = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -850,7 +850,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // SERIALIZATION_LIB
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.serializationLib = iprot.readString();
+              struct.serializationLib = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setSerializationLibIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -886,7 +886,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 5: // SERIALIZER_CLASS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.serializerClass = iprot.readString();
+              struct.serializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setSerializerClassIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -894,7 +894,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 6: // DESERIALIZER_CLASS
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.deserializerClass = iprot.readString();
+              struct.deserializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setDeserializerClassIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1047,11 +1047,11 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(7);
       if (incoming.get(0)) {
-        struct.name = iprot.readString();
+        struct.name = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setNameIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.serializationLib = iprot.readString();
+        struct.serializationLib = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setSerializationLibIsSet(true);
       }
       if (incoming.get(2)) {
@@ -1074,11 +1074,11 @@ import org.slf4j.LoggerFactory;
         struct.setDescriptionIsSet(true);
       }
       if (incoming.get(4)) {
-        struct.serializerClass = iprot.readString();
+        struct.serializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setSerializerClassIsSet(true);
       }
       if (incoming.get(5)) {
-        struct.deserializerClass = iprot.readString();
+        struct.deserializerClass = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setDeserializerClassIsSet(true);
       }
       if (incoming.get(6)) {

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
index 00e6041..3cfa765 100644
--- 
a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
+++ 
b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
@@ -1308,7 +1308,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 2: // LOCATION
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.location = iprot.readString();
+              struct.location = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setLocationIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1316,7 +1316,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 3: // INPUT_FORMAT
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.inputFormat = iprot.readString();
+              struct.inputFormat = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setInputFormatIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1324,7 +1324,7 @@ import org.slf4j.LoggerFactory;
             break;
           case 4: // OUTPUT_FORMAT
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.outputFormat = iprot.readString();
+              struct.outputFormat = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
               struct.setOutputFormatIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
@@ -1368,7 +1368,7 @@ import org.slf4j.LoggerFactory;
                 }
                 iprot.readListEnd();
               }
-              struct.setBucketColsIsSet(true);
+              struct.bucketCols = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.bucketCols); 
struct.setBucketColsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
             }
@@ -1666,15 +1666,15 @@ import org.slf4j.LoggerFactory;
         struct.setColsIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.location = iprot.readString();
+        struct.location = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setLocationIsSet(true);
       }
       if (incoming.get(2)) {
-        struct.inputFormat = iprot.readString();
+        struct.inputFormat = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setInputFormatIsSet(true);
       }
       if (incoming.get(3)) {
-        struct.outputFormat = iprot.readString();
+        struct.outputFormat = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
         struct.setOutputFormatIsSet(true);
       }
       if (incoming.get(4)) {
@@ -1701,7 +1701,7 @@ import org.slf4j.LoggerFactory;
             struct.bucketCols.add(_elem189);
           }
         }
-        struct.setBucketColsIsSet(true);
+        struct.bucketCols = 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.bucketCols); 
struct.setBucketColsIsSet(true);
       }
       if (incoming.get(8)) {
         {

http://git-wip-us.apache.org/repos/asf/hive/blob/154a6865/standalone-metastore/src/main/resources/thrift-replacements.txt
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/resources/thrift-replacements.txt 
b/standalone-metastore/src/main/resources/thrift-replacements.txt
index 01ee71a..d985717 100644
--- a/standalone-metastore/src/main/resources/thrift-replacements.txt
+++ b/standalone-metastore/src/main/resources/thrift-replacements.txt
@@ -35,6 +35,11 @@ this\.inputFormat\ \=\ inputFormat;=this.inputFormat\ \=\ 
org.apache.hadoop.hive
 this\.outputFormat\ \=\ outputFormat;=this.outputFormat\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(outputFormat);
 this\.dbName\ \=\ dbName;=this.dbName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName);
 this\.tableName\ \=\ tableName;=this.tableName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName);
+this\.catName\ \=\ catName;=this\.catName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(catName);
+this\.serializerClass\ \=\ serializerClass;=this\.serializerClass\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(serializerClass);
+this\.deserializerClass\ \=\ deserializerClass;=this\.deserializerClass\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(deserializerClass);
+this\.colName\ \=\ colName;=this\.colName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colName);
+this\.colType\ \=\ colType;=this\.colType\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colType);
 
 # Fix constructors and setters of List<String> instance fields
 
@@ -55,6 +60,11 @@ this\.inputFormat\ \=\ other\.inputFormat;=this.inputFormat\ 
\=\ org.apache.hado
 this\.outputFormat\ \=\ other\.outputFormat;=this.outputFormat\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.outputFormat);
 this\.dbName\ \=\ other\.dbName;=this.dbName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.dbName);
 this\.tableName\ \=\ other\.tableName;=this.tableName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.tableName);
+this\.catName\ \=\ other\.catName;=this\.catName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.catName);
+this\.serializerClass\ \=\ other\.serializerClass;=this\.serializerClass\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.serializerClass);
+this\.deserializerClass\ \=\ 
other\.deserializerClass;=this\.deserializerClass\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.deserializerClass);
+this\.colName\ \=\ other\.colName;=this\.colName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colName);
+this\.colType\ \=\ other\.colType;=this\.colType\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colType);
 
 __this__parameters_copy_key\ \=\ 
other_element_key;=__this__parameters_copy_key\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other_element_key);
 __this__parameters_copy_value\ \=\ 
other_element_value;=__this__parameters_copy_value\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other_element_value);
@@ -67,3 +77,30 @@ this\.parameters\.put\(key,\ 
val\);=this.parameters.put(org.apache.hadoop.hive.m
 # Fix the deserialization methods in Partitions.java: intern parameters after 
it's deserialized
 
 struct\.setParametersIsSet\(true\);=struct.parameters\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.parameters);\ 
struct.setParametersIsSet(true);
+
+# Fix the StandardScheme read method which deserializes the fields into the 
thrift objects
+
+# PartitionStandardScheme - parameters are already interned above
+struct\.dbName\ \=\ iprot\.readString\(\);=struct\.dbName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.tableName\ \=\ iprot\.readString\(\);=struct\.tableName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.catName\ \=\ iprot\.readString\(\);=struct\.catName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+
+# StorageDescriptorStandardScheme - parameters are already interned above
+struct\.location\ \=\ iprot\.readString\(\);=struct\.location\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.inputFormat\ \=\ iprot\.readString\(\);=struct\.inputFormat\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.outputFormat\ \=\ iprot\.readString\(\);=struct\.outputFormat\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.setBucketColsIsSet\(true\);=struct\.bucketCols\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.bucketCols);\ 
struct.setBucketColsIsSet(true);
+
+# SerDeInfoStandardScheme - parameters are already interned above
+struct\.name\ \=\ iprot\.readString\(\);=struct\.name\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.serializationLib\ \=\ iprot\.readString\(\);=struct\.serializationLib\ 
\=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.serializerClass\ \=\ iprot\.readString\(\);=struct\.serializerClass\ 
\=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.deserializerClass\ \=\ 
iprot\.readString\(\);=struct\.deserializerClass\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+
+# FieldSchemaStandardScheme - name field gets automatically handled above
+struct\.type\ \=\ iprot\.readString\(\);=struct\.type\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.comment\ \=\ iprot\.readString\(\);=struct\.comment\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+
+# ColumnStatisticsObjStandardScheme
+struct\.colName\ \=\ iprot\.readString\(\);=struct\.colName\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
+struct\.colType\ \=\ iprot\.readString\(\);=struct\.colType\ \=\ 
org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot\.readString\(\));
\ No newline at end of file

Reply via email to