You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by cw...@apache.org on 2011/01/31 21:35:58 UTC

svn commit: r1065757 - in /hive/trunk: CHANGES.txt metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java

Author: cws
Date: Mon Jan 31 20:35:58 2011
New Revision: 1065757

URL: http://svn.apache.org/viewvc?rev=1065757&view=rev
Log:
HIVE-1931 Improve the implementation of the METASTORE_CACHE_PINOBJTYPES config (Mac Yang via cws)

Modified:
    hive/trunk/CHANGES.txt
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java

Modified: hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hive/trunk/CHANGES.txt?rev=1065757&r1=1065756&r2=1065757&view=diff
==============================================================================
--- hive/trunk/CHANGES.txt (original)
+++ hive/trunk/CHANGES.txt Mon Jan 31 20:35:58 2011
@@ -168,6 +168,8 @@ Trunk -  Unreleased
 
   IMPROVEMENTS
 
+    HIVE-1931 Improve the implementation of the METASTORE_CACHE_PINOBJTYPES config (Mac Yang via cws)"
+
     HIVE-1692. FetchOperator.getInputFormatFromCache hides causal exception (Philip Zeyliger via cws)
 
     HIVE-1899 Add a factory method for creating a synchronized wrapper for IMetaStoreClient (John Sichi via cws)

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java?rev=1065757&r1=1065756&r2=1065757&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java Mon Jan 31 20:35:58 2011
@@ -236,6 +236,7 @@ public class ObjectStore implements RawS
       if (dsc != null) {
         HiveConf conf = new HiveConf(ObjectStore.class);
         String objTypes = HiveConf.getVar(conf, HiveConf.ConfVars.METASTORE_CACHE_PINOBJTYPES);
+        LOG.info("Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes=\"" + objTypes + "\"");
         if (objTypes != null && objTypes.length() > 0) {
           objTypes = objTypes.toLowerCase();
           String[] typeTokens = objTypes.split(",");
@@ -244,8 +245,13 @@ public class ObjectStore implements RawS
             if (PINCLASSMAP.containsKey(type)) {
               dsc.pinAll(true, PINCLASSMAP.get(type));
             }
+            else {
+              LOG.warn(type + " is not one of the pinnable object types: " + org.apache.commons.lang.StringUtils.join(PINCLASSMAP.keySet(), " "));
+            }
           }
         }
+      } else {
+        LOG.warn("PersistenceManagerFactory returned null DataStoreCache object. Unable to initialize object pin types defined by hive.metastore.cache.pinobjtypes");
       }
     }
     return pmf;