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/02/18 23:18:51 UTC

svn commit: r1072171 - /hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java

Author: cws
Date: Fri Feb 18 22:18:51 2011
New Revision: 1072171

URL: http://svn.apache.org/viewvc?rev=1072171&view=rev
Log:
HIVE-1995 Mismatched open/commit transaction calls when using get_partition() (Paul Yang via cws)

Modified:
    hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java

Modified: hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java?rev=1072171&r1=1072170&r2=1072171&view=diff
==============================================================================
--- hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (original)
+++ hive/branches/branch-0.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java Fri Feb 18 22:18:51 2011
@@ -151,7 +151,7 @@ public class HiveMetaStore extends Thrif
       if (!ShimLoader.getHadoopShims().isSecureShimImpl() || cmd == null) {
         return;
       }
-      
+
       UserGroupInformation ugi;
       try {
         ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf());
@@ -161,7 +161,7 @@ public class HiveMetaStore extends Thrif
       InetAddress addr = TLoggingProcessor.getRemoteAddress();
       final Formatter fmt = auditFormatter.get();
       ((StringBuilder)fmt.out()).setLength(0);
-      auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), 
+      auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(),
           addr == null ? "unknown-ip-addr" : addr.toString(), cmd).toString());
     }
 
@@ -486,7 +486,7 @@ public class HiveMetaStore extends Thrif
       try {
         Metrics.startScope(function);
       } catch (IOException e) {
-        LOG.debug("Exception when starting metrics scope" 
+        LOG.debug("Exception when starting metrics scope"
                     + e.getClass().getName() + " " + e.getMessage());
         MetaStoreUtils.printStackTrace(e);
       }
@@ -1128,7 +1128,7 @@ public class HiveMetaStore extends Thrif
 
         Partition old_part = null;
         try {
-          old_part = get_partition(part.getDbName(), part
+          old_part = ms.getPartition(part.getDbName(), part
             .getTableName(), part.getValues());
         } catch (NoSuchObjectException e) {
           // this means there is no existing partition
@@ -1260,7 +1260,7 @@ public class HiveMetaStore extends Thrif
         ms.openTransaction();
         Partition old_part = null;
         try {
-          old_part = get_partition(part.getDbName(), part
+          old_part = ms.getPartition(part.getDbName(), part
             .getTableName(), part.getValues());
         } catch(NoSuchObjectException e) {
           // this means there is no existing partition
@@ -1359,7 +1359,7 @@ public class HiveMetaStore extends Thrif
 
       try {
         ms.openTransaction();
-        part = get_partition(db_name, tbl_name, part_vals);
+        part = ms.getPartition(db_name, tbl_name, part_vals);
 
         if (part == null) {
           throw new NoSuchObjectException("Partition doesn't exist. "
@@ -2762,7 +2762,7 @@ public class HiveMetaStore extends Thrif
             if (partName != null) {
               Partition part = null;
               part = get_partition_by_name(dbName, tableName, partName);
-              List<MPartitionColumnPrivilege> mPartitionCols 
+              List<MPartitionColumnPrivilege> mPartitionCols
                   = ms.listPrincipalPartitionColumnGrants(principalName,
                   principalType, dbName, tableName, partName, columnName);
               if (mPartitionCols.size() > 0) {
@@ -3106,7 +3106,7 @@ public class HiveMetaStore extends Thrif
       TServerTransport serverTransport = tcpKeepAlive ?
           new TServerSocketKeepAlive(port) : new TServerSocket(port);
 
-      TProcessor processor = 
+      TProcessor processor =
         new TLoggingProcessor(new ThriftHiveMetastore.Processor(handler));
       TTransportFactory transFactory;
       if (useSasl) {
@@ -3142,7 +3142,7 @@ public class HiveMetaStore extends Thrif
       throw x;
     }
   }
-  //Assists audit logger - gets the remote client's IP address. 
+  //Assists audit logger - gets the remote client's IP address.
   private static class TLoggingProcessor implements TProcessor {
     private final static ThreadLocal<InetAddress> remoteAddress =
       new ThreadLocal<InetAddress>() {
@@ -3158,7 +3158,7 @@ public class HiveMetaStore extends Thrif
     static InetAddress getRemoteAddress() {
       return remoteAddress.get();
     }
-    public boolean process(final TProtocol inProt, final TProtocol outProt) 
+    public boolean process(final TProtocol inProt, final TProtocol outProt)
     throws TException {
       if (TSocket.class.isAssignableFrom(inProt.getTransport().getClass())) {
         Socket socket = ((TSocket)inProt.getTransport()).getSocket();