cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r787258 - in /incubator/cassandra/trunk: interface/cassandra.thrift interface/gen-java/org/apache/cassandra/service/Cassandra.java src/java/org/apache/cassandra/service/CassandraServer.java
Date Mon, 22 Jun 2009 14:46:27 GMT
Author: jbellis
Date: Mon Jun 22 14:46:27 2009
New Revision: 787258

URL: http://svn.apache.org/viewvc?rev=787258&view=rev
Log:
rename "end" parameter to "finish" to avoid conflict w/ ruby keyword.  patch by Stu Hood;
reviewed by jbellis for CASSANDRA-247

Modified:
    incubator/cassandra/trunk/interface/cassandra.thrift
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java

Modified: incubator/cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/cassandra.thrift?rev=787258&r1=787257&r2=787258&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/cassandra.thrift (original)
+++ incubator/cassandra/trunk/interface/cassandra.thrift Mon Jun 22 14:46:27 2009
@@ -104,7 +104,7 @@
   list<column_t> get_slice(1:string tablename, 2:string key, 3:string columnParent,
4:i32 start=-1, 5:i32 count=-1)
   throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
   
-  list<column_t> get_slice_by_name_range(1:string tablename, 2:string key, 3:string
columnParent, 4:string start, 5:string end, 6:i32 count=-1)
+  list<column_t> get_slice_by_name_range(1:string tablename, 2:string key, 3:string
columnParent, 4:string start, 5:string finish, 6:i32 count=-1)
   throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
   
   list<column_t> get_slice_by_names(1:string tablename, 2:string key, 3:string columnParent,
4:list<string> columnNames)

Modified: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java?rev=787258&r1=787257&r2=787258&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
(original)
+++ incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
Mon Jun 22 14:46:27 2009
@@ -24,7 +24,7 @@
 
     public List<column_t> get_slice(String tablename, String key, String columnParent,
int start, int count) throws InvalidRequestException, NotFoundException, TException;
 
-    public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String end, int count) throws InvalidRequestException, NotFoundException,
TException;
+    public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String finish, int count) throws InvalidRequestException, NotFoundException,
TException;
 
     public List<column_t> get_slice_by_names(String tablename, String key, String columnParent,
List<String> columnNames) throws InvalidRequestException, NotFoundException, TException;
 
@@ -132,13 +132,13 @@
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_slice failed:
unknown result");
     }
 
-    public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String end, int count) throws InvalidRequestException, NotFoundException,
TException
+    public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String finish, int count) throws InvalidRequestException, NotFoundException,
TException
     {
-      send_get_slice_by_name_range(tablename, key, columnParent, start, end, count);
+      send_get_slice_by_name_range(tablename, key, columnParent, start, finish, count);
       return recv_get_slice_by_name_range();
     }
 
-    public void send_get_slice_by_name_range(String tablename, String key, String columnParent,
String start, String end, int count) throws TException
+    public void send_get_slice_by_name_range(String tablename, String key, String columnParent,
String start, String finish, int count) throws TException
     {
       oprot_.writeMessageBegin(new TMessage("get_slice_by_name_range", TMessageType.CALL,
seqid_));
       get_slice_by_name_range_args args = new get_slice_by_name_range_args();
@@ -146,7 +146,7 @@
       args.key = key;
       args.columnParent = columnParent;
       args.start = start;
-      args.end = end;
+      args.finish = finish;
       args.count = count;
       args.write(oprot_);
       oprot_.writeMessageEnd();
@@ -919,7 +919,7 @@
         iprot.readMessageEnd();
         get_slice_by_name_range_result result = new get_slice_by_name_range_result();
         try {
-          result.success = iface_.get_slice_by_name_range(args.tablename, args.key, args.columnParent,
args.start, args.end, args.count);
+          result.success = iface_.get_slice_by_name_range(args.tablename, args.key, args.columnParent,
args.start, args.finish, args.count);
         } catch (InvalidRequestException ire) {
           result.ire = ire;
         } catch (NotFoundException nfe) {
@@ -2274,7 +2274,7 @@
     private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)2);
     private static final TField COLUMN_PARENT_FIELD_DESC = new TField("columnParent", TType.STRING,
(short)3);
     private static final TField START_FIELD_DESC = new TField("start", TType.STRING, (short)4);
-    private static final TField END_FIELD_DESC = new TField("end", TType.STRING, (short)5);
+    private static final TField FINISH_FIELD_DESC = new TField("finish", TType.STRING, (short)5);
     private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)6);
 
     public String tablename;
@@ -2285,8 +2285,8 @@
     public static final int COLUMNPARENT = 3;
     public String start;
     public static final int START = 4;
-    public String end;
-    public static final int END = 5;
+    public String finish;
+    public static final int FINISH = 5;
     public int count;
     public static final int COUNT = 6;
 
@@ -2304,7 +2304,7 @@
           new FieldValueMetaData(TType.STRING)));
       put(START, new FieldMetaData("start", TFieldRequirementType.DEFAULT, 
           new FieldValueMetaData(TType.STRING)));
-      put(END, new FieldMetaData("end", TFieldRequirementType.DEFAULT, 
+      put(FINISH, new FieldMetaData("finish", TFieldRequirementType.DEFAULT, 
           new FieldValueMetaData(TType.STRING)));
       put(COUNT, new FieldMetaData("count", TFieldRequirementType.DEFAULT, 
           new FieldValueMetaData(TType.I32)));
@@ -2324,7 +2324,7 @@
       String key,
       String columnParent,
       String start,
-      String end,
+      String finish,
       int count)
     {
       this();
@@ -2332,7 +2332,7 @@
       this.key = key;
       this.columnParent = columnParent;
       this.start = start;
-      this.end = end;
+      this.finish = finish;
       this.count = count;
       this.__isset.count = true;
     }
@@ -2353,8 +2353,8 @@
       if (other.isSetStart()) {
         this.start = other.start;
       }
-      if (other.isSetEnd()) {
-        this.end = other.end;
+      if (other.isSetFinish()) {
+        this.finish = other.finish;
       }
       __isset.count = other.__isset.count;
       this.count = other.count;
@@ -2457,26 +2457,26 @@
       }
     }
 
-    public String getEnd() {
-      return this.end;
+    public String getFinish() {
+      return this.finish;
     }
 
-    public void setEnd(String end) {
-      this.end = end;
+    public void setFinish(String finish) {
+      this.finish = finish;
     }
 
-    public void unsetEnd() {
-      this.end = null;
+    public void unsetFinish() {
+      this.finish = null;
     }
 
-    // Returns true if field end is set (has been asigned a value) and false otherwise
-    public boolean isSetEnd() {
-      return this.end != null;
+    // Returns true if field finish is set (has been asigned a value) and false otherwise
+    public boolean isSetFinish() {
+      return this.finish != null;
     }
 
-    public void setEndIsSet(boolean value) {
+    public void setFinishIsSet(boolean value) {
       if (!value) {
-        this.end = null;
+        this.finish = null;
       }
     }
 
@@ -2536,11 +2536,11 @@
         }
         break;
 
-      case END:
+      case FINISH:
         if (value == null) {
-          unsetEnd();
+          unsetFinish();
         } else {
-          setEnd((String)value);
+          setFinish((String)value);
         }
         break;
 
@@ -2571,8 +2571,8 @@
       case START:
         return getStart();
 
-      case END:
-        return getEnd();
+      case FINISH:
+        return getFinish();
 
       case COUNT:
         return new Integer(getCount());
@@ -2593,8 +2593,8 @@
         return isSetColumnParent();
       case START:
         return isSetStart();
-      case END:
-        return isSetEnd();
+      case FINISH:
+        return isSetFinish();
       case COUNT:
         return isSetCount();
       default:
@@ -2651,12 +2651,12 @@
           return false;
       }
 
-      boolean this_present_end = true && this.isSetEnd();
-      boolean that_present_end = true && that.isSetEnd();
-      if (this_present_end || that_present_end) {
-        if (!(this_present_end && that_present_end))
+      boolean this_present_finish = true && this.isSetFinish();
+      boolean that_present_finish = true && that.isSetFinish();
+      if (this_present_finish || that_present_finish) {
+        if (!(this_present_finish && that_present_finish))
           return false;
-        if (!this.end.equals(that.end))
+        if (!this.finish.equals(that.finish))
           return false;
       }
 
@@ -2716,9 +2716,9 @@
               TProtocolUtil.skip(iprot, field.type);
             }
             break;
-          case END:
+          case FINISH:
             if (field.type == TType.STRING) {
-              this.end = iprot.readString();
+              this.finish = iprot.readString();
             } else { 
               TProtocolUtil.skip(iprot, field.type);
             }
@@ -2768,9 +2768,9 @@
         oprot.writeString(this.start);
         oprot.writeFieldEnd();
       }
-      if (this.end != null) {
-        oprot.writeFieldBegin(END_FIELD_DESC);
-        oprot.writeString(this.end);
+      if (this.finish != null) {
+        oprot.writeFieldBegin(FINISH_FIELD_DESC);
+        oprot.writeString(this.finish);
         oprot.writeFieldEnd();
       }
       oprot.writeFieldBegin(COUNT_FIELD_DESC);
@@ -2817,11 +2817,11 @@
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("end:");
-      if (this.end == null) {
+      sb.append("finish:");
+      if (this.finish == null) {
         sb.append("null");
       } else {
-        sb.append(this.end);
+        sb.append(this.finish);
       }
       first = false;
       if (!first) sb.append(", ");

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java?rev=787258&r1=787257&r2=787258&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java Mon
Jun 22 14:46:27 2009
@@ -529,11 +529,11 @@
         return StorageProxy.getKeyRange(new RangeCommand(tablename, columnFamilies, startWith,
stopAt, maxResults));
     }
 
-	public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String end, int count)
+	public List<column_t> get_slice_by_name_range(String tablename, String key, String
columnParent, String start, String finish, int count)
     throws InvalidRequestException, NotFoundException, TException
     {
 		logger.debug("get_slice_by_range");
-        ColumnFamily cfamily = readColumnFamily(new SliceByRangeReadCommand(tablename, key,
columnParent, start, end, count));
+        ColumnFamily cfamily = readColumnFamily(new SliceByRangeReadCommand(tablename, key,
columnParent, start, finish, count));
         if (cfamily == null)
         {
             return EMPTY_COLUMNS;



Mime
View raw message