You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/10/27 20:19:17 UTC

svn commit: r830300 - in /incubator/cassandra/branches/cassandra-0.4: CHANGES.txt interface/cassandra.thrift interface/gen-java/org/apache/cassandra/service/Cassandra.java src/java/org/apache/cassandra/service/CassandraServer.java

Author: jbellis
Date: Tue Oct 27 19:19:15 2009
New Revision: 830300

URL: http://svn.apache.org/viewvc?rev=830300&view=rev
Log:
remove NotFoundException from get_slice throws list.  patch by jbellis; reviewed by Stu Hood for CASSANDRA-518

Modified:
    incubator/cassandra/branches/cassandra-0.4/CHANGES.txt
    incubator/cassandra/branches/cassandra-0.4/interface/cassandra.thrift
    incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java
    incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/service/CassandraServer.java

Modified: incubator/cassandra/branches/cassandra-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.4/CHANGES.txt?rev=830300&r1=830299&r2=830300&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.4/CHANGES.txt (original)
+++ incubator/cassandra/branches/cassandra-0.4/CHANGES.txt Tue Oct 27 19:19:15 2009
@@ -5,6 +5,7 @@
    (CASSANDRA-493)
  * Improve default garbage collector options (CASSANDRA-504)
  * Add "nodeprobe flush" (CASSANDRA-505)
+ * remove NotFoundException from get_slice throws list (CASSANDRA-518)
 
 
 0.4.1

Modified: incubator/cassandra/branches/cassandra-0.4/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.4/interface/cassandra.thrift?rev=830300&r1=830299&r2=830300&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.4/interface/cassandra.thrift (original)
+++ incubator/cassandra/branches/cassandra-0.4/interface/cassandra.thrift Tue Oct 27 19:19:15 2009
@@ -121,7 +121,7 @@
                                       3:required ColumnParent column_parent, 
                                       4:required SlicePredicate predicate, 
                                       5:required ConsistencyLevel consistency_level=1)
-                              throws (1: InvalidRequestException ire, 2: NotFoundException nfe, 3: UnavailableException ue),
+                              throws (1: InvalidRequestException ire, 3: UnavailableException ue),
 
   map<string,ColumnOrSuperColumn> multiget(1:required string keyspace, 
                                            2:required list<string> keys, 

Modified: incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java?rev=830300&r1=830299&r2=830300&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java (original)
+++ incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java Tue Oct 27 19:19:15 2009
@@ -48,7 +48,7 @@
 
     public ColumnOrSuperColumn get(String keyspace, String key, ColumnPath column_path, int consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TException;
 
-    public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TException;
+    public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, UnavailableException, TException;
 
     public Map<String,ColumnOrSuperColumn> multiget(String keyspace, List<String> keys, ColumnPath column_path, int consistency_level) throws InvalidRequestException, UnavailableException, TException;
 
@@ -144,7 +144,7 @@
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result");
     }
 
-    public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TException
+    public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level) throws InvalidRequestException, UnavailableException, TException
     {
       send_get_slice(keyspace, key, column_parent, predicate, consistency_level);
       return recv_get_slice();
@@ -164,7 +164,7 @@
       oprot_.getTransport().flush();
     }
 
-    public List<ColumnOrSuperColumn> recv_get_slice() throws InvalidRequestException, NotFoundException, UnavailableException, TException
+    public List<ColumnOrSuperColumn> recv_get_slice() throws InvalidRequestException, UnavailableException, TException
     {
       TMessage msg = iprot_.readMessageBegin();
       if (msg.type == TMessageType.EXCEPTION) {
@@ -181,9 +181,6 @@
       if (result.ire != null) {
         throw result.ire;
       }
-      if (result.nfe != null) {
-        throw result.nfe;
-      }
       if (result.ue != null) {
         throw result.ue;
       }
@@ -671,8 +668,6 @@
           result.success = iface_.get_slice(args.keyspace, args.key, args.column_parent, args.predicate, args.consistency_level);
         } catch (InvalidRequestException ire) {
           result.ire = ire;
-        } catch (NotFoundException nfe) {
-          result.nfe = nfe;
         } catch (UnavailableException ue) {
           result.ue = ue;
         } catch (Throwable th) {
@@ -2548,16 +2543,13 @@
     private static final TStruct STRUCT_DESC = new TStruct("get_slice_result");
     private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
     private static final TField IRE_FIELD_DESC = new TField("ire", TType.STRUCT, (short)1);
-    private static final TField NFE_FIELD_DESC = new TField("nfe", TType.STRUCT, (short)2);
     private static final TField UE_FIELD_DESC = new TField("ue", TType.STRUCT, (short)3);
 
     public List<ColumnOrSuperColumn> success;
     public InvalidRequestException ire;
-    public NotFoundException nfe;
     public UnavailableException ue;
     public static final int SUCCESS = 0;
     public static final int IRE = 1;
-    public static final int NFE = 2;
     public static final int UE = 3;
 
     // isset id assignments
@@ -2568,8 +2560,6 @@
               new StructMetaData(TType.STRUCT, ColumnOrSuperColumn.class))));
       put(IRE, new FieldMetaData("ire", TFieldRequirementType.DEFAULT, 
           new FieldValueMetaData(TType.STRUCT)));
-      put(NFE, new FieldMetaData("nfe", TFieldRequirementType.DEFAULT, 
-          new FieldValueMetaData(TType.STRUCT)));
       put(UE, new FieldMetaData("ue", TFieldRequirementType.DEFAULT, 
           new FieldValueMetaData(TType.STRUCT)));
     }});
@@ -2584,13 +2574,11 @@
     public get_slice_result(
       List<ColumnOrSuperColumn> success,
       InvalidRequestException ire,
-      NotFoundException nfe,
       UnavailableException ue)
     {
       this();
       this.success = success;
       this.ire = ire;
-      this.nfe = nfe;
       this.ue = ue;
     }
 
@@ -2608,9 +2596,6 @@
       if (other.isSetIre()) {
         this.ire = new InvalidRequestException(other.ire);
       }
-      if (other.isSetNfe()) {
-        this.nfe = new NotFoundException(other.nfe);
-      }
       if (other.isSetUe()) {
         this.ue = new UnavailableException(other.ue);
       }
@@ -2673,30 +2658,6 @@
       }
     }
 
-    public NotFoundException getNfe() {
-      return this.nfe;
-    }
-
-    public get_slice_result setNfe(NotFoundException nfe) {
-      this.nfe = nfe;
-      return this;
-    }
-
-    public void unsetNfe() {
-      this.nfe = null;
-    }
-
-    // Returns true if field nfe is set (has been asigned a value) and false otherwise
-    public boolean isSetNfe() {
-      return this.nfe != null;
-    }
-
-    public void setNfeIsSet(boolean value) {
-      if (!value) {
-        this.nfe = null;
-      }
-    }
-
     public UnavailableException getUe() {
       return this.ue;
     }
@@ -2739,14 +2700,6 @@
         }
         break;
 
-      case NFE:
-        if (value == null) {
-          unsetNfe();
-        } else {
-          setNfe((NotFoundException)value);
-        }
-        break;
-
       case UE:
         if (value == null) {
           unsetUe();
@@ -2768,9 +2721,6 @@
       case IRE:
         return getIre();
 
-      case NFE:
-        return getNfe();
-
       case UE:
         return getUe();
 
@@ -2786,8 +2736,6 @@
         return isSetSuccess();
       case IRE:
         return isSetIre();
-      case NFE:
-        return isSetNfe();
       case UE:
         return isSetUe();
       default:
@@ -2826,15 +2774,6 @@
           return false;
       }
 
-      boolean this_present_nfe = true && this.isSetNfe();
-      boolean that_present_nfe = true && that.isSetNfe();
-      if (this_present_nfe || that_present_nfe) {
-        if (!(this_present_nfe && that_present_nfe))
-          return false;
-        if (!this.nfe.equals(that.nfe))
-          return false;
-      }
-
       boolean this_present_ue = true && this.isSetUe();
       boolean that_present_ue = true && that.isSetUe();
       if (this_present_ue || that_present_ue) {
@@ -2876,14 +2815,6 @@
       if (lastComparison != 0) {
         return lastComparison;
       }
-      lastComparison = Boolean.valueOf(isSetNfe()).compareTo(isSetNfe());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      lastComparison = TBaseHelper.compareTo(nfe, typedOther.nfe);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
       lastComparison = Boolean.valueOf(isSetUe()).compareTo(isSetUe());
       if (lastComparison != 0) {
         return lastComparison;
@@ -2932,14 +2863,6 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
-          case NFE:
-            if (field.type == TType.STRUCT) {
-              this.nfe = new NotFoundException();
-              this.nfe.read(iprot);
-            } else { 
-              TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
           case UE:
             if (field.type == TType.STRUCT) {
               this.ue = new UnavailableException();
@@ -2979,10 +2902,6 @@
         oprot.writeFieldBegin(IRE_FIELD_DESC);
         this.ire.write(oprot);
         oprot.writeFieldEnd();
-      } else if (this.isSetNfe()) {
-        oprot.writeFieldBegin(NFE_FIELD_DESC);
-        this.nfe.write(oprot);
-        oprot.writeFieldEnd();
       } else if (this.isSetUe()) {
         oprot.writeFieldBegin(UE_FIELD_DESC);
         this.ue.write(oprot);
@@ -3013,14 +2932,6 @@
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("nfe:");
-      if (this.nfe == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.nfe);
-      }
-      first = false;
-      if (!first) sb.append(", ");
       sb.append("ue:");
       if (this.ue == null) {
         sb.append("null");

Modified: incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/service/CassandraServer.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/service/CassandraServer.java?rev=830300&r1=830299&r2=830300&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/service/CassandraServer.java (original)
+++ incubator/cassandra/branches/cassandra-0.4/src/java/org/apache/cassandra/service/CassandraServer.java Tue Oct 27 19:19:15 2009
@@ -208,7 +208,7 @@
     }
 
     public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level)
-    throws InvalidRequestException, NotFoundException, UnavailableException
+    throws InvalidRequestException, UnavailableException
     {
         if (logger.isDebugEnabled())
             logger.debug("get_slice");