You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2012/01/20 19:52:08 UTC

svn commit: r1234065 [1/3] - in /hive/trunk/metastore: if/ src/gen/thrift/gen-cpp/ src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ src/gen/thrift/gen-php/hive_metastore/ src/gen/thrift/gen-py/hive_metastore/ src/gen/thrift/gen-rb/ src...

Author: namit
Date: Fri Jan 20 18:52:07 2012
New Revision: 1234065

URL: http://svn.apache.org/viewvc?rev=1234065&view=rev
Log:
HIVE-2674 get_partitions_ps throws TApplicationException if table doesn't
exist (Kevin Wilfong via namit)


Modified:
    hive/trunk/metastore/if/hive_metastore.thrift
    hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
    hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java

Modified: hive/trunk/metastore/if/hive_metastore.thrift
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/if/hive_metastore.thrift?rev=1234065&r1=1234064&r2=1234065&view=diff
==============================================================================
--- hive/trunk/metastore/if/hive_metastore.thrift (original)
+++ hive/trunk/metastore/if/hive_metastore.thrift Fri Jan 20 18:52:07 2012
@@ -348,13 +348,13 @@ service ThriftHiveMetastore extends fb30
   // as "".
   list<Partition> get_partitions_ps(1:string db_name 2:string tbl_name 
   	3:list<string> part_vals, 4:i16 max_parts=-1)
-                       throws(1:MetaException o1)
+                       throws(1:MetaException o1, 2:NoSuchObjectException o2)
   list<Partition> get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list<string> part_vals, 4:i16 max_parts=-1, 
      5: string user_name, 6: list<string> group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2)                       
   
   list<string> get_partition_names_ps(1:string db_name, 
   	2:string tbl_name, 3:list<string> part_vals, 4:i16 max_parts=-1)
-  	                   throws(1:MetaException o1)
+  	                   throws(1:MetaException o1, 2:NoSuchObjectException o2)
 
   // get the partitions matching the given partition filter
   list<Partition> get_partitions_by_filter(1:string db_name 2:string tbl_name

Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp?rev=1234065&r1=1234064&r2=1234065&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp Fri Jan 20 18:52:07 2012
@@ -7704,6 +7704,14 @@ uint32_t ThriftHiveMetastore_get_partiti
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->o2.read(iprot);
+          this->__isset.o2 = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -7738,6 +7746,10 @@ uint32_t ThriftHiveMetastore_get_partiti
     xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
     xfer += this->o1.write(oprot);
     xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.o2) {
+    xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->o2.write(oprot);
+    xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
@@ -7792,6 +7804,14 @@ uint32_t ThriftHiveMetastore_get_partiti
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->o2.read(iprot);
+          this->__isset.o2 = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -8340,6 +8360,14 @@ uint32_t ThriftHiveMetastore_get_partiti
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->o2.read(iprot);
+          this->__isset.o2 = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -8374,6 +8402,10 @@ uint32_t ThriftHiveMetastore_get_partiti
     xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1);
     xfer += this->o1.write(oprot);
     xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.o2) {
+    xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2);
+    xfer += this->o2.write(oprot);
+    xfer += oprot->writeFieldEnd();
   }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
@@ -8428,6 +8460,14 @@ uint32_t ThriftHiveMetastore_get_partiti
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+          xfer += this->o2.read(iprot);
+          this->__isset.o2 = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -17162,6 +17202,9 @@ void ThriftHiveMetastoreClient::recv_get
   if (result.__isset.o1) {
     throw result.o1;
   }
+  if (result.__isset.o2) {
+    throw result.o2;
+  }
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result");
 }
 
@@ -17295,6 +17338,9 @@ void ThriftHiveMetastoreClient::recv_get
   if (result.__isset.o1) {
     throw result.o1;
   }
+  if (result.__isset.o2) {
+    throw result.o2;
+  }
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result");
 }
 
@@ -21144,6 +21190,9 @@ void ThriftHiveMetastoreProcessor::proce
   } catch (MetaException &o1) {
     result.o1 = o1;
     result.__isset.o1 = true;
+  } catch (NoSuchObjectException &o2) {
+    result.o2 = o2;
+    result.__isset.o2 = true;
   } catch (const std::exception& e) {
     if (eventHandler_.get() != NULL) {
       eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps");
@@ -21261,6 +21310,9 @@ void ThriftHiveMetastoreProcessor::proce
   } catch (MetaException &o1) {
     result.o1 = o1;
     result.__isset.o1 = true;
+  } catch (NoSuchObjectException &o2) {
+    result.o2 = o2;
+    result.__isset.o2 = true;
   } catch (const std::exception& e) {
     if (eventHandler_.get() != NULL) {
       eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps");

Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h?rev=1234065&r1=1234064&r2=1234065&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h Fri Jan 20 18:52:07 2012
@@ -4823,9 +4823,10 @@ class ThriftHiveMetastore_get_partitions
 };
 
 typedef struct _ThriftHiveMetastore_get_partitions_ps_result__isset {
-  _ThriftHiveMetastore_get_partitions_ps_result__isset() : success(false), o1(false) {}
+  _ThriftHiveMetastore_get_partitions_ps_result__isset() : success(false), o1(false), o2(false) {}
   bool success;
   bool o1;
+  bool o2;
 } _ThriftHiveMetastore_get_partitions_ps_result__isset;
 
 class ThriftHiveMetastore_get_partitions_ps_result {
@@ -4838,6 +4839,7 @@ class ThriftHiveMetastore_get_partitions
 
   std::vector<Partition>  success;
   MetaException o1;
+  NoSuchObjectException o2;
 
   _ThriftHiveMetastore_get_partitions_ps_result__isset __isset;
 
@@ -4849,12 +4851,18 @@ class ThriftHiveMetastore_get_partitions
     o1 = val;
   }
 
+  void __set_o2(const NoSuchObjectException& val) {
+    o2 = val;
+  }
+
   bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const
   {
     if (!(success == rhs.success))
       return false;
     if (!(o1 == rhs.o1))
       return false;
+    if (!(o2 == rhs.o2))
+      return false;
     return true;
   }
   bool operator != (const ThriftHiveMetastore_get_partitions_ps_result &rhs) const {
@@ -4869,9 +4877,10 @@ class ThriftHiveMetastore_get_partitions
 };
 
 typedef struct _ThriftHiveMetastore_get_partitions_ps_presult__isset {
-  _ThriftHiveMetastore_get_partitions_ps_presult__isset() : success(false), o1(false) {}
+  _ThriftHiveMetastore_get_partitions_ps_presult__isset() : success(false), o1(false), o2(false) {}
   bool success;
   bool o1;
+  bool o2;
 } _ThriftHiveMetastore_get_partitions_ps_presult__isset;
 
 class ThriftHiveMetastore_get_partitions_ps_presult {
@@ -4882,6 +4891,7 @@ class ThriftHiveMetastore_get_partitions
 
   std::vector<Partition> * success;
   MetaException o1;
+  NoSuchObjectException o2;
 
   _ThriftHiveMetastore_get_partitions_ps_presult__isset __isset;
 
@@ -5141,9 +5151,10 @@ class ThriftHiveMetastore_get_partition_
 };
 
 typedef struct _ThriftHiveMetastore_get_partition_names_ps_result__isset {
-  _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false) {}
+  _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false), o2(false) {}
   bool success;
   bool o1;
+  bool o2;
 } _ThriftHiveMetastore_get_partition_names_ps_result__isset;
 
 class ThriftHiveMetastore_get_partition_names_ps_result {
@@ -5156,6 +5167,7 @@ class ThriftHiveMetastore_get_partition_
 
   std::vector<std::string>  success;
   MetaException o1;
+  NoSuchObjectException o2;
 
   _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset;
 
@@ -5167,12 +5179,18 @@ class ThriftHiveMetastore_get_partition_
     o1 = val;
   }
 
+  void __set_o2(const NoSuchObjectException& val) {
+    o2 = val;
+  }
+
   bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const
   {
     if (!(success == rhs.success))
       return false;
     if (!(o1 == rhs.o1))
       return false;
+    if (!(o2 == rhs.o2))
+      return false;
     return true;
   }
   bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const {
@@ -5187,9 +5205,10 @@ class ThriftHiveMetastore_get_partition_
 };
 
 typedef struct _ThriftHiveMetastore_get_partition_names_ps_presult__isset {
-  _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false) {}
+  _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false), o2(false) {}
   bool success;
   bool o1;
+  bool o2;
 } _ThriftHiveMetastore_get_partition_names_ps_presult__isset;
 
 class ThriftHiveMetastore_get_partition_names_ps_presult {
@@ -5200,6 +5219,7 @@ class ThriftHiveMetastore_get_partition_
 
   std::vector<std::string> * success;
   MetaException o1;
+  NoSuchObjectException o2;
 
   _ThriftHiveMetastore_get_partition_names_ps_presult__isset __isset;