cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r981913 [3/3] - in /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift: AuthenticationRequest.java Cassandra.java CfDef.java Constants.java IndexClause.java KeySlice.java KsDef.java TokenRange.java
Date Tue, 03 Aug 2010 15:03:34 GMT
Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java Tue Aug
 3 15:03:33 2010
@@ -1248,14 +1248,14 @@ public class CfDef implements TBase<CfDe
         case 13: // COLUMN_METADATA
           if (field.type == TType.LIST) {
             {
-              TList _list29 = iprot.readListBegin();
-              this.column_metadata = new ArrayList<ColumnDef>(_list29.size);
-              for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+              TList _list25 = iprot.readListBegin();
+              this.column_metadata = new ArrayList<ColumnDef>(_list25.size);
+              for (int _i26 = 0; _i26 < _list25.size; ++_i26)
               {
-                ColumnDef _elem31;
-                _elem31 = new ColumnDef();
-                _elem31.read(iprot);
-                this.column_metadata.add(_elem31);
+                ColumnDef _elem27;
+                _elem27 = new ColumnDef();
+                _elem27.read(iprot);
+                this.column_metadata.add(_elem27);
               }
               iprot.readListEnd();
             }
@@ -1363,9 +1363,9 @@ public class CfDef implements TBase<CfDe
         oprot.writeFieldBegin(COLUMN_METADATA_FIELD_DESC);
         {
           oprot.writeListBegin(new TList(TType.STRUCT, this.column_metadata.size()));
-          for (ColumnDef _iter32 : this.column_metadata)
+          for (ColumnDef _iter28 : this.column_metadata)
           {
-            _iter32.write(oprot);
+            _iter28.write(oprot);
           }
           oprot.writeListEnd();
         }

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java Tue
Aug  3 15:03:33 2010
@@ -42,6 +42,6 @@ import org.slf4j.LoggerFactory;
 
 public class Constants {
 
-  public static final String VERSION = "9.0.0";
+  public static final String VERSION = "10.0.0";
 
 }

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
(original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
Tue Aug  3 15:03:33 2010
@@ -50,18 +50,18 @@ public class IndexClause implements TBas
   private static final TStruct STRUCT_DESC = new TStruct("IndexClause");
 
   private static final TField EXPRESSIONS_FIELD_DESC = new TField("expressions", TType.LIST,
(short)1);
-  private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)2);
-  private static final TField START_KEY_FIELD_DESC = new TField("start_key", TType.STRING,
(short)3);
+  private static final TField START_KEY_FIELD_DESC = new TField("start_key", TType.STRING,
(short)2);
+  private static final TField COUNT_FIELD_DESC = new TField("count", TType.I32, (short)3);
 
   public List<IndexExpression> expressions;
-  public int count;
   public byte[] start_key;
+  public int count;
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
     EXPRESSIONS((short)1, "expressions"),
-    COUNT((short)2, "count"),
-    START_KEY((short)3, "start_key");
+    START_KEY((short)2, "start_key"),
+    COUNT((short)3, "count");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -78,10 +78,10 @@ public class IndexClause implements TBas
       switch(fieldId) {
         case 1: // EXPRESSIONS
           return EXPRESSIONS;
-        case 2: // COUNT
-          return COUNT;
-        case 3: // START_KEY
+        case 2: // START_KEY
           return START_KEY;
+        case 3: // COUNT
+          return COUNT;
         default:
           return null;
       }
@@ -131,10 +131,10 @@ public class IndexClause implements TBas
     tmpMap.put(_Fields.EXPRESSIONS, new FieldMetaData("expressions", TFieldRequirementType.REQUIRED,

         new ListMetaData(TType.LIST, 
             new StructMetaData(TType.STRUCT, IndexExpression.class))));
+    tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.REQUIRED,

+        new FieldValueMetaData(TType.STRING)));
     tmpMap.put(_Fields.COUNT, new FieldMetaData("count", TFieldRequirementType.REQUIRED,

         new FieldValueMetaData(TType.I32)));
-    tmpMap.put(_Fields.START_KEY, new FieldMetaData("start_key", TFieldRequirementType.OPTIONAL,

-        new FieldValueMetaData(TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(IndexClause.class, metaDataMap);
   }
@@ -146,10 +146,12 @@ public class IndexClause implements TBas
 
   public IndexClause(
     List<IndexExpression> expressions,
+    byte[] start_key,
     int count)
   {
     this();
     this.expressions = expressions;
+    this.start_key = start_key;
     this.count = count;
     setCountIsSet(true);
   }
@@ -167,11 +169,11 @@ public class IndexClause implements TBas
       }
       this.expressions = __this__expressions;
     }
-    this.count = other.count;
     if (other.isSetStart_key()) {
       this.start_key = new byte[other.start_key.length];
       System.arraycopy(other.start_key, 0, start_key, 0, other.start_key.length);
     }
+    this.count = other.count;
   }
 
   public IndexClause deepCopy() {
@@ -222,29 +224,6 @@ public class IndexClause implements TBas
     }
   }
 
-  public int getCount() {
-    return this.count;
-  }
-
-  public IndexClause setCount(int count) {
-    this.count = count;
-    setCountIsSet(true);
-    return this;
-  }
-
-  public void unsetCount() {
-    __isset_bit_vector.clear(__COUNT_ISSET_ID);
-  }
-
-  /** Returns true if field count is set (has been asigned a value) and false otherwise */
-  public boolean isSetCount() {
-    return __isset_bit_vector.get(__COUNT_ISSET_ID);
-  }
-
-  public void setCountIsSet(boolean value) {
-    __isset_bit_vector.set(__COUNT_ISSET_ID, value);
-  }
-
   public byte[] getStart_key() {
     return this.start_key;
   }
@@ -269,6 +248,29 @@ public class IndexClause implements TBas
     }
   }
 
+  public int getCount() {
+    return this.count;
+  }
+
+  public IndexClause setCount(int count) {
+    this.count = count;
+    setCountIsSet(true);
+    return this;
+  }
+
+  public void unsetCount() {
+    __isset_bit_vector.clear(__COUNT_ISSET_ID);
+  }
+
+  /** Returns true if field count is set (has been asigned a value) and false otherwise */
+  public boolean isSetCount() {
+    return __isset_bit_vector.get(__COUNT_ISSET_ID);
+  }
+
+  public void setCountIsSet(boolean value) {
+    __isset_bit_vector.set(__COUNT_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case EXPRESSIONS:
@@ -279,19 +281,19 @@ public class IndexClause implements TBas
       }
       break;
 
-    case COUNT:
+    case START_KEY:
       if (value == null) {
-        unsetCount();
+        unsetStart_key();
       } else {
-        setCount((Integer)value);
+        setStart_key((byte[])value);
       }
       break;
 
-    case START_KEY:
+    case COUNT:
       if (value == null) {
-        unsetStart_key();
+        unsetCount();
       } else {
-        setStart_key((byte[])value);
+        setCount((Integer)value);
       }
       break;
 
@@ -307,12 +309,12 @@ public class IndexClause implements TBas
     case EXPRESSIONS:
       return getExpressions();
 
-    case COUNT:
-      return new Integer(getCount());
-
     case START_KEY:
       return getStart_key();
 
+    case COUNT:
+      return new Integer(getCount());
+
     }
     throw new IllegalStateException();
   }
@@ -326,10 +328,10 @@ public class IndexClause implements TBas
     switch (field) {
     case EXPRESSIONS:
       return isSetExpressions();
-    case COUNT:
-      return isSetCount();
     case START_KEY:
       return isSetStart_key();
+    case COUNT:
+      return isSetCount();
     }
     throw new IllegalStateException();
   }
@@ -360,15 +362,6 @@ public class IndexClause implements TBas
         return false;
     }
 
-    boolean this_present_count = true;
-    boolean that_present_count = true;
-    if (this_present_count || that_present_count) {
-      if (!(this_present_count && that_present_count))
-        return false;
-      if (this.count != that.count)
-        return false;
-    }
-
     boolean this_present_start_key = true && this.isSetStart_key();
     boolean that_present_start_key = true && that.isSetStart_key();
     if (this_present_start_key || that_present_start_key) {
@@ -378,6 +371,15 @@ public class IndexClause implements TBas
         return false;
     }
 
+    boolean this_present_count = true;
+    boolean that_present_count = true;
+    if (this_present_count || that_present_count) {
+      if (!(this_present_count && that_present_count))
+        return false;
+      if (this.count != that.count)
+        return false;
+    }
+
     return true;
   }
 
@@ -403,20 +405,20 @@ public class IndexClause implements TBas
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetCount()).compareTo(typedOther.isSetCount());
+    lastComparison = Boolean.valueOf(isSetStart_key()).compareTo(typedOther.isSetStart_key());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetCount()) {      lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
+    if (isSetStart_key()) {      lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetStart_key()).compareTo(typedOther.isSetStart_key());
+    lastComparison = Boolean.valueOf(isSetCount()).compareTo(typedOther.isSetCount());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetStart_key()) {      lastComparison = TBaseHelper.compareTo(this.start_key, typedOther.start_key);
+    if (isSetCount()) {      lastComparison = TBaseHelper.compareTo(this.count, typedOther.count);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -452,17 +454,17 @@ public class IndexClause implements TBas
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case 2: // COUNT
-          if (field.type == TType.I32) {
-            this.count = iprot.readI32();
-            setCountIsSet(true);
+        case 2: // START_KEY
+          if (field.type == TType.STRING) {
+            this.start_key = iprot.readBinary();
           } else { 
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case 3: // START_KEY
-          if (field.type == TType.STRING) {
-            this.start_key = iprot.readBinary();
+        case 3: // COUNT
+          if (field.type == TType.I32) {
+            this.count = iprot.readI32();
+            setCountIsSet(true);
           } else { 
             TProtocolUtil.skip(iprot, field.type);
           }
@@ -497,16 +499,14 @@ public class IndexClause implements TBas
       }
       oprot.writeFieldEnd();
     }
+    if (this.start_key != null) {
+      oprot.writeFieldBegin(START_KEY_FIELD_DESC);
+      oprot.writeBinary(this.start_key);
+      oprot.writeFieldEnd();
+    }
     oprot.writeFieldBegin(COUNT_FIELD_DESC);
     oprot.writeI32(this.count);
     oprot.writeFieldEnd();
-    if (this.start_key != null) {
-      if (isSetStart_key()) {
-        oprot.writeFieldBegin(START_KEY_FIELD_DESC);
-        oprot.writeBinary(this.start_key);
-        oprot.writeFieldEnd();
-      }
-    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -524,24 +524,22 @@ public class IndexClause implements TBas
     }
     first = false;
     if (!first) sb.append(", ");
+    sb.append("start_key:");
+    if (this.start_key == null) {
+      sb.append("null");
+    } else {
+        int __start_key_size = Math.min(this.start_key.length, 128);
+        for (int i = 0; i < __start_key_size; i++) {
+          if (i != 0) sb.append(" ");
+          sb.append(Integer.toHexString(this.start_key[i]).length() > 1 ? Integer.toHexString(this.start_key[i]).substring(Integer.toHexString(this.start_key[i]).length()
- 2).toUpperCase() : "0" + Integer.toHexString(this.start_key[i]).toUpperCase());
+        }
+        if (this.start_key.length > 128) sb.append(" ...");
+    }
+    first = false;
+    if (!first) sb.append(", ");
     sb.append("count:");
     sb.append(this.count);
     first = false;
-    if (isSetStart_key()) {
-      if (!first) sb.append(", ");
-      sb.append("start_key:");
-      if (this.start_key == null) {
-        sb.append("null");
-      } else {
-          int __start_key_size = Math.min(this.start_key.length, 128);
-          for (int i = 0; i < __start_key_size; i++) {
-            if (i != 0) sb.append(" ");
-            sb.append(Integer.toHexString(this.start_key[i]).length() > 1 ? Integer.toHexString(this.start_key[i]).substring(Integer.toHexString(this.start_key[i]).length()
- 2).toUpperCase() : "0" + Integer.toHexString(this.start_key[i]).toUpperCase());
-          }
-          if (this.start_key.length > 128) sb.append(" ...");
-      }
-      first = false;
-    }
     sb.append(")");
     return sb.toString();
   }
@@ -551,6 +549,9 @@ public class IndexClause implements TBas
     if (expressions == null) {
       throw new TProtocolException("Required field 'expressions' was not present! Struct:
" + toString());
     }
+    if (start_key == null) {
+      throw new TProtocolException("Required field 'start_key' was not present! Struct: "
+ toString());
+    }
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans
generator.
   }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java Tue
Aug  3 15:03:33 2010
@@ -382,14 +382,14 @@ public class KeySlice implements TBase<K
         case 2: // COLUMNS
           if (field.type == TType.LIST) {
             {
-              TList _list16 = iprot.readListBegin();
-              this.columns = new ArrayList<ColumnOrSuperColumn>(_list16.size);
-              for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+              TList _list12 = iprot.readListBegin();
+              this.columns = new ArrayList<ColumnOrSuperColumn>(_list12.size);
+              for (int _i13 = 0; _i13 < _list12.size; ++_i13)
               {
-                ColumnOrSuperColumn _elem18;
-                _elem18 = new ColumnOrSuperColumn();
-                _elem18.read(iprot);
-                this.columns.add(_elem18);
+                ColumnOrSuperColumn _elem14;
+                _elem14 = new ColumnOrSuperColumn();
+                _elem14.read(iprot);
+                this.columns.add(_elem14);
               }
               iprot.readListEnd();
             }
@@ -421,9 +421,9 @@ public class KeySlice implements TBase<K
       oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.columns.size()));
-        for (ColumnOrSuperColumn _iter19 : this.columns)
+        for (ColumnOrSuperColumn _iter15 : this.columns)
         {
-          _iter19.write(oprot);
+          _iter15.write(oprot);
         }
         oprot.writeListEnd();
       }

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java Tue Aug
 3 15:03:33 2010
@@ -607,15 +607,15 @@ public class KsDef implements TBase<KsDe
         case 3: // STRATEGY_OPTIONS
           if (field.type == TType.MAP) {
             {
-              TMap _map33 = iprot.readMapBegin();
-              this.strategy_options = new HashMap<String,String>(2*_map33.size);
-              for (int _i34 = 0; _i34 < _map33.size; ++_i34)
+              TMap _map29 = iprot.readMapBegin();
+              this.strategy_options = new HashMap<String,String>(2*_map29.size);
+              for (int _i30 = 0; _i30 < _map29.size; ++_i30)
               {
-                String _key35;
-                String _val36;
-                _key35 = iprot.readString();
-                _val36 = iprot.readString();
-                this.strategy_options.put(_key35, _val36);
+                String _key31;
+                String _val32;
+                _key31 = iprot.readString();
+                _val32 = iprot.readString();
+                this.strategy_options.put(_key31, _val32);
               }
               iprot.readMapEnd();
             }
@@ -634,14 +634,14 @@ public class KsDef implements TBase<KsDe
         case 5: // CF_DEFS
           if (field.type == TType.LIST) {
             {
-              TList _list37 = iprot.readListBegin();
-              this.cf_defs = new ArrayList<CfDef>(_list37.size);
-              for (int _i38 = 0; _i38 < _list37.size; ++_i38)
+              TList _list33 = iprot.readListBegin();
+              this.cf_defs = new ArrayList<CfDef>(_list33.size);
+              for (int _i34 = 0; _i34 < _list33.size; ++_i34)
               {
-                CfDef _elem39;
-                _elem39 = new CfDef();
-                _elem39.read(iprot);
-                this.cf_defs.add(_elem39);
+                CfDef _elem35;
+                _elem35 = new CfDef();
+                _elem35.read(iprot);
+                this.cf_defs.add(_elem35);
               }
               iprot.readListEnd();
             }
@@ -682,10 +682,10 @@ public class KsDef implements TBase<KsDe
         oprot.writeFieldBegin(STRATEGY_OPTIONS_FIELD_DESC);
         {
           oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.strategy_options.size()));
-          for (Map.Entry<String, String> _iter40 : this.strategy_options.entrySet())
+          for (Map.Entry<String, String> _iter36 : this.strategy_options.entrySet())
           {
-            oprot.writeString(_iter40.getKey());
-            oprot.writeString(_iter40.getValue());
+            oprot.writeString(_iter36.getKey());
+            oprot.writeString(_iter36.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -699,9 +699,9 @@ public class KsDef implements TBase<KsDe
       oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.cf_defs.size()));
-        for (CfDef _iter41 : this.cf_defs)
+        for (CfDef _iter37 : this.cf_defs)
         {
-          _iter41.write(oprot);
+          _iter37.write(oprot);
         }
         oprot.writeListEnd();
       }

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java?rev=981913&r1=981912&r2=981913&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java
(original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java
Tue Aug  3 15:03:33 2010
@@ -448,13 +448,13 @@ public class TokenRange implements TBase
         case 3: // ENDPOINTS
           if (field.type == TType.LIST) {
             {
-              TList _list20 = iprot.readListBegin();
-              this.endpoints = new ArrayList<String>(_list20.size);
-              for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+              TList _list16 = iprot.readListBegin();
+              this.endpoints = new ArrayList<String>(_list16.size);
+              for (int _i17 = 0; _i17 < _list16.size; ++_i17)
               {
-                String _elem22;
-                _elem22 = iprot.readString();
-                this.endpoints.add(_elem22);
+                String _elem18;
+                _elem18 = iprot.readString();
+                this.endpoints.add(_elem18);
               }
               iprot.readListEnd();
             }
@@ -491,9 +491,9 @@ public class TokenRange implements TBase
       oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.endpoints.size()));
-        for (String _iter23 : this.endpoints)
+        for (String _iter19 : this.endpoints)
         {
-          oprot.writeString(_iter23);
+          oprot.writeString(_iter19);
         }
         oprot.writeListEnd();
       }



Mime
View raw message