Skip to content
This repository
  • 2 commits
  • 10 files changed
  • 0 comments
  • 1 contributor
3,600  src/Apache/Cassandra/Cassandra.cs
3017 additions, 583 deletions not shown
174  src/Apache/Cassandra/CfSplit.cs
... ...
@@ -0,0 +1,174 @@
  1
+/**
  2
+ * Autogenerated by Thrift Compiler (0.9.0)
  3
+ *
  4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5
+ *  @generated
  6
+ */
  7
+using System;
  8
+using System.Collections;
  9
+using System.Collections.Generic;
  10
+using System.Text;
  11
+using System.IO;
  12
+using FluentCassandra.Thrift;
  13
+using FluentCassandra.Thrift.Collections;
  14
+using System.Runtime.Serialization;
  15
+using FluentCassandra.Thrift.Protocol;
  16
+using FluentCassandra.Thrift.Transport;
  17
+
  18
+namespace FluentCassandra.Apache.Cassandra
  19
+{
  20
+
  21
+  /// <summary>
  22
+  /// Represents input splits used by hadoop ColumnFamilyRecordReaders
  23
+  /// </summary>
  24
+  #if !SILVERLIGHT
  25
+  [Serializable]
  26
+  #endif
  27
+  public partial class CfSplit : TBase
  28
+  {
  29
+    private string _start_token;
  30
+    private string _end_token;
  31
+    private long _row_count;
  32
+
  33
+    public string Start_token
  34
+    {
  35
+      get
  36
+      {
  37
+        return _start_token;
  38
+      }
  39
+      set
  40
+      {
  41
+        __isset.start_token = true;
  42
+        this._start_token = value;
  43
+      }
  44
+    }
  45
+
  46
+    public string End_token
  47
+    {
  48
+      get
  49
+      {
  50
+        return _end_token;
  51
+      }
  52
+      set
  53
+      {
  54
+        __isset.end_token = true;
  55
+        this._end_token = value;
  56
+      }
  57
+    }
  58
+
  59
+    public long Row_count
  60
+    {
  61
+      get
  62
+      {
  63
+        return _row_count;
  64
+      }
  65
+      set
  66
+      {
  67
+        __isset.row_count = true;
  68
+        this._row_count = value;
  69
+      }
  70
+    }
  71
+
  72
+
  73
+    public Isset __isset;
  74
+    #if !SILVERLIGHT
  75
+    [Serializable]
  76
+    #endif
  77
+    public struct Isset {
  78
+      public bool start_token;
  79
+      public bool end_token;
  80
+      public bool row_count;
  81
+    }
  82
+
  83
+    public CfSplit() {
  84
+    }
  85
+
  86
+    public void Read (TProtocol iprot)
  87
+    {
  88
+      TField field;
  89
+      iprot.ReadStructBegin();
  90
+      while (true)
  91
+      {
  92
+        field = iprot.ReadFieldBegin();
  93
+        if (field.Type == TType.Stop) { 
  94
+          break;
  95
+        }
  96
+        switch (field.ID)
  97
+        {
  98
+          case 1:
  99
+            if (field.Type == TType.String) {
  100
+              Start_token = iprot.ReadString();
  101
+            } else { 
  102
+              TProtocolUtil.Skip(iprot, field.Type);
  103
+            }
  104
+            break;
  105
+          case 2:
  106
+            if (field.Type == TType.String) {
  107
+              End_token = iprot.ReadString();
  108
+            } else { 
  109
+              TProtocolUtil.Skip(iprot, field.Type);
  110
+            }
  111
+            break;
  112
+          case 3:
  113
+            if (field.Type == TType.I64) {
  114
+              Row_count = iprot.ReadI64();
  115
+            } else { 
  116
+              TProtocolUtil.Skip(iprot, field.Type);
  117
+            }
  118
+            break;
  119
+          default: 
  120
+            TProtocolUtil.Skip(iprot, field.Type);
  121
+            break;
  122
+        }
  123
+        iprot.ReadFieldEnd();
  124
+      }
  125
+      iprot.ReadStructEnd();
  126
+    }
  127
+
  128
+    public void Write(TProtocol oprot) {
  129
+      TStruct struc = new TStruct("CfSplit");
  130
+      oprot.WriteStructBegin(struc);
  131
+      TField field = new TField();
  132
+      if (Start_token != null && __isset.start_token) {
  133
+        field.Name = "start_token";
  134
+        field.Type = TType.String;
  135
+        field.ID = 1;
  136
+        oprot.WriteFieldBegin(field);
  137
+        oprot.WriteString(Start_token);
  138
+        oprot.WriteFieldEnd();
  139
+      }
  140
+      if (End_token != null && __isset.end_token) {
  141
+        field.Name = "end_token";
  142
+        field.Type = TType.String;
  143
+        field.ID = 2;
  144
+        oprot.WriteFieldBegin(field);
  145
+        oprot.WriteString(End_token);
  146
+        oprot.WriteFieldEnd();
  147
+      }
  148
+      if (__isset.row_count) {
  149
+        field.Name = "row_count";
  150
+        field.Type = TType.I64;
  151
+        field.ID = 3;
  152
+        oprot.WriteFieldBegin(field);
  153
+        oprot.WriteI64(Row_count);
  154
+        oprot.WriteFieldEnd();
  155
+      }
  156
+      oprot.WriteFieldStop();
  157
+      oprot.WriteStructEnd();
  158
+    }
  159
+
  160
+    public override string ToString() {
  161
+      StringBuilder sb = new StringBuilder("CfSplit(");
  162
+      sb.Append("Start_token: ");
  163
+      sb.Append(Start_token);
  164
+      sb.Append(",End_token: ");
  165
+      sb.Append(End_token);
  166
+      sb.Append(",Row_count: ");
  167
+      sb.Append(Row_count);
  168
+      sb.Append(")");
  169
+      return sb.ToString();
  170
+    }
  171
+
  172
+  }
  173
+
  174
+}
2  src/Apache/Cassandra/Constants.cs
@@ -17,6 +17,6 @@ namespace FluentCassandra.Apache.Cassandra
17 17
 {
18 18
   public class Constants
19 19
   {
20  
-    public static string VERSION = "19.32.0";
  20
+    public static string VERSION = "19.35.0";
21 21
   }
22 22
 }
3  src/Apache/Cassandra/IndexClause.cs
@@ -19,11 +19,12 @@ namespace FluentCassandra.Apache.Cassandra
19 19
 {
20 20
 
21 21
   /// <summary>
22  
-  /// @Deprecated: use a KeyRange with row_filter in get_range_slices instead
  22
+  /// @deprecated use a KeyRange with row_filter in get_range_slices instead
23 23
   /// </summary>
24 24
   #if !SILVERLIGHT
25 25
   [Serializable]
26 26
   #endif
  27
+  [Obsolete("use a KeyRange with row_filter in get_range_slices instead", error: false)]
27 28
   public partial class IndexClause : TBase
28 29
   {
29 30
     private List<IndexExpression> _expressions;
1  src/Apache/Cassandra/IndexType.cs
@@ -11,5 +11,6 @@ public enum IndexType
11 11
   {
12 12
     KEYS = 0,
13 13
     CUSTOM = 1,
  14
+    COMPOSITES = 2,
14 15
   }
15 16
 }
3  src/Apache/Cassandra/KsDef.cs
@@ -70,8 +70,9 @@ public string Strategy_class
70 70
     }
71 71
 
72 72
     /// <summary>
73  
-    /// @deprecated, ignored
  73
+    /// @deprecated ignored
74 74
     /// </summary>
  75
+	[Obsolete("ignored by Cassandra 1.2", error:false)]
75 76
     public int Replication_factor
76 77
     {
77 78
       get
4  src/Apache/Cassandra/SchemaDisagreementException.cs
@@ -19,11 +19,15 @@ namespace FluentCassandra.Apache.Cassandra
19 19
 {
20 20
 
21 21
   /// <summary>
  22
+  /// NOTE: This up outdated exception left for backward compatibility reasons,
  23
+  /// no actual schema agreement validation is done starting from Cassandra 1.2
  24
+  /// 
22 25
   /// schemas are not in agreement across all nodes
23 26
   /// </summary>
24 27
   #if !SILVERLIGHT
25 28
   [Serializable]
26 29
   #endif
  30
+  [Obsolete("This up outdated exception left for backward compatibility reasons, no actual schema agreement validation is done starting from Cassandra 1.2", error: false)]
27 31
   public partial class SchemaDisagreementException : Exception, TBase
28 32
   {
29 33
 
82  src/Apache/Cassandra/TimedOutException.cs
@@ -26,6 +26,53 @@ namespace FluentCassandra.Apache.Cassandra
26 26
   #endif
27 27
   public partial class TimedOutException : Exception, TBase
28 28
   {
  29
+    private int _acknowledged_by;
  30
+    private bool _acknowledged_by_batchlog;
  31
+
  32
+    /// <summary>
  33
+    /// if a write operation was acknowledged by some replicas but not by enough to
  34
+    /// satisfy the required ConsistencyLevel, the number of successful
  35
+    /// replies will be given here. In case of atomic_batch_mutate method this field
  36
+    /// will be set to -1 if the batch was written to the batchlog and to 0 if it wasn't.
  37
+    /// </summary>
  38
+    public int Acknowledged_by
  39
+    {
  40
+      get
  41
+      {
  42
+        return _acknowledged_by;
  43
+      }
  44
+      set
  45
+      {
  46
+        __isset.acknowledged_by = true;
  47
+        this._acknowledged_by = value;
  48
+      }
  49
+    }
  50
+
  51
+    /// <summary>
  52
+    /// in case of atomic_batch_mutate method this field tells if the batch was written to the batchlog.
  53
+    /// </summary>
  54
+    public bool Acknowledged_by_batchlog
  55
+    {
  56
+      get
  57
+      {
  58
+        return _acknowledged_by_batchlog;
  59
+      }
  60
+      set
  61
+      {
  62
+        __isset.acknowledged_by_batchlog = true;
  63
+        this._acknowledged_by_batchlog = value;
  64
+      }
  65
+    }
  66
+
  67
+
  68
+    public Isset __isset;
  69
+    #if !SILVERLIGHT
  70
+    [Serializable]
  71
+    #endif
  72
+    public struct Isset {
  73
+      public bool acknowledged_by;
  74
+      public bool acknowledged_by_batchlog;
  75
+    }
29 76
 
30 77
     public TimedOutException() {
31 78
     }
@@ -42,6 +89,20 @@ public void Read (TProtocol iprot)
42 89
         }
43 90
         switch (field.ID)
44 91
         {
  92
+          case 1:
  93
+            if (field.Type == TType.I32) {
  94
+              Acknowledged_by = iprot.ReadI32();
  95
+            } else { 
  96
+              TProtocolUtil.Skip(iprot, field.Type);
  97
+            }
  98
+            break;
  99
+          case 2:
  100
+            if (field.Type == TType.Bool) {
  101
+              Acknowledged_by_batchlog = iprot.ReadBool();
  102
+            } else { 
  103
+              TProtocolUtil.Skip(iprot, field.Type);
  104
+            }
  105
+            break;
45 106
           default: 
46 107
             TProtocolUtil.Skip(iprot, field.Type);
47 108
             break;
@@ -54,12 +115,33 @@ public void Read (TProtocol iprot)
54 115
     public void Write(TProtocol oprot) {
55 116
       TStruct struc = new TStruct("TimedOutException");
56 117
       oprot.WriteStructBegin(struc);
  118
+      TField field = new TField();
  119
+      if (__isset.acknowledged_by) {
  120
+        field.Name = "acknowledged_by";
  121
+        field.Type = TType.I32;
  122
+        field.ID = 1;
  123
+        oprot.WriteFieldBegin(field);
  124
+        oprot.WriteI32(Acknowledged_by);
  125
+        oprot.WriteFieldEnd();
  126
+      }
  127
+      if (__isset.acknowledged_by_batchlog) {
  128
+        field.Name = "acknowledged_by_batchlog";
  129
+        field.Type = TType.Bool;
  130
+        field.ID = 2;
  131
+        oprot.WriteFieldBegin(field);
  132
+        oprot.WriteBool(Acknowledged_by_batchlog);
  133
+        oprot.WriteFieldEnd();
  134
+      }
57 135
       oprot.WriteFieldStop();
58 136
       oprot.WriteStructEnd();
59 137
     }
60 138
 
61 139
     public override string ToString() {
62 140
       StringBuilder sb = new StringBuilder("TimedOutException(");
  141
+      sb.Append("Acknowledged_by: ");
  142
+      sb.Append(Acknowledged_by);
  143
+      sb.Append(",Acknowledged_by_batchlog: ");
  144
+      sb.Append(Acknowledged_by_batchlog);
63 145
       sb.Append(")");
64 146
       return sb.ToString();
65 147
     }
1  src/FluentCassandra.csproj
@@ -59,6 +59,7 @@
59 59
     <Compile Include="Apache\Cassandra\AuthorizationException.cs" />
60 60
     <Compile Include="Apache\Cassandra\Cassandra.cs" />
61 61
     <Compile Include="Apache\Cassandra\CfDef.cs" />
  62
+    <Compile Include="Apache\Cassandra\CfSplit.cs" />
62 63
     <Compile Include="Apache\Cassandra\Column.cs" />
63 64
     <Compile Include="Apache\Cassandra\ColumnDef.cs" />
64 65
     <Compile Include="Apache\Cassandra\ColumnOrSuperColumn.cs" />
38  src/Operations/CassandraClientWrapper.cs
@@ -5,7 +5,7 @@
5 5
 
6 6
 namespace FluentCassandra.Operations
7 7
 {
8  
-	public class CassandraClientWrapper //: Apache.Cassandra.Cassandra.Iface
  8
+	public class CassandraClientWrapper : Apache.Cassandra.Cassandra.Iface
9 9
 	{
10 10
 		private readonly Apache.Cassandra.Cassandra.Iface _client;
11 11
 
@@ -70,7 +70,7 @@ public int get_count(CassandraObject key, CassandraColumnParent column_parent, C
70 70
 
71 71
 		public List<Apache.Cassandra.KeySlice> get_range_slices(CassandraColumnParent column_parent, CassandraSlicePredicate predicate, CassandraKeyRange range, Apache.Cassandra.ConsistencyLevel consistency_level)
72 72
 		{
73  
-        	return _client.get_range_slices(
  73
+			return _client.get_range_slices(
74 74
 				Helper.CreateColumnParent(column_parent),
75 75
 				Helper.CreateSlicePredicate(predicate),
76 76
 				Helper.CreateKeyRange(range),
@@ -247,5 +247,39 @@ public void set_cql_version(string version)
247 247
 		}
248 248
 
249 249
 		#endregion
  250
+
  251
+		#region version 1.2.0
  252
+
  253
+		public void atomic_batch_mutate(Dictionary<byte[], Dictionary<string, List<Apache.Cassandra.Mutation>>> mutation_map, Apache.Cassandra.ConsistencyLevel consistency_level)
  254
+		{
  255
+			_client.atomic_batch_mutate(mutation_map, consistency_level);
  256
+		}
  257
+
  258
+		public byte[] trace_next_query()
  259
+		{
  260
+			return _client.trace_next_query();
  261
+		}
  262
+
  263
+		public List<Apache.Cassandra.CfSplit> describe_splits_ex(string cfName, string start_token, string end_token, int keys_per_split)
  264
+		{
  265
+			return _client.describe_splits_ex(cfName, start_token, end_token, keys_per_split);
  266
+		}
  267
+
  268
+		public Apache.Cassandra.CqlResult execute_cql3_query(byte[] query, Apache.Cassandra.Compression compression, Apache.Cassandra.ConsistencyLevel consistency)
  269
+		{
  270
+			return _client.execute_cql3_query(query, compression, consistency);
  271
+		}
  272
+
  273
+		public Apache.Cassandra.CqlPreparedResult prepare_cql3_query(byte[] query, Apache.Cassandra.Compression compression)
  274
+		{
  275
+			return _client.prepare_cql3_query(query, compression);
  276
+		}
  277
+
  278
+		public Apache.Cassandra.CqlResult execute_prepared_cql3_query(int itemId, List<byte[]> values, Apache.Cassandra.ConsistencyLevel consistency)
  279
+		{
  280
+			return _client.execute_prepared_cql3_query(itemId, values, consistency);
  281
+		}
  282
+
  283
+		#endregion
250 284
 	}
251 285
 }

No commit comments for this range

Something went wrong with that request. Please try again.