hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject hive git commit: HIVE-17007: NPE introduced by HIVE-16871 (Daniel Dai, reviewed by Sushanth Sowmyan)
Date Wed, 05 Jul 2017 17:51:25 GMT
Repository: hive
Updated Branches:
  refs/heads/master 0731dab18 -> ae927155d


HIVE-17007: NPE introduced by HIVE-16871 (Daniel Dai, reviewed by Sushanth Sowmyan)


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

Branch: refs/heads/master
Commit: ae927155d6db5a9e2e07d3d8b51dbf817de817dc
Parents: 0731dab
Author: Daniel Dai <daijy@hortonworks.com>
Authored: Wed Jul 5 10:51:12 2017 -0700
Committer: Daniel Dai <daijy@hortonworks.com>
Committed: Wed Jul 5 10:51:12 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/metastore/cache/SharedCache.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ae927155/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java b/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
index b454372..b6fb4fd 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java
@@ -137,7 +137,7 @@ public class SharedCache {
   }
 
   public static synchronized ColumnStatisticsObj getCachedTableColStats(String colStatsCacheKey)
{
-    return tableColStatsCache.get(colStatsCacheKey).deepCopy();
+    return tableColStatsCache.get(colStatsCacheKey)!=null?tableColStatsCache.get(colStatsCacheKey).deepCopy():null;
   }
 
   public static synchronized void removeTableColStatsFromCache(String dbName, String tblName)
{
@@ -426,7 +426,7 @@ public class SharedCache {
   }
 
   public static synchronized ColumnStatisticsObj getCachedPartitionColStats(String key) {
-    return partitionColStatsCache.get(key).deepCopy();
+    return partitionColStatsCache.get(key)!=null?partitionColStatsCache.get(key).deepCopy():null;
   }
 
   public static synchronized void addPartitionColStatsToCache(String dbName, String tableName,


Mime
View raw message