Permalink
Browse files

added support for Cassandra 1.2 interface

  • Loading branch information...
1 parent d8c7ecf commit 37584f4e3720c204999e4a982ebe4740f1a8048a @nberardi nberardi committed Jan 2, 2013

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,174 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using FluentCassandra.Thrift;
+using FluentCassandra.Thrift.Collections;
+using System.Runtime.Serialization;
+using FluentCassandra.Thrift.Protocol;
+using FluentCassandra.Thrift.Transport;
+
+namespace FluentCassandra.Apache.Cassandra
+{
+
+ /// <summary>
+ /// Represents input splits used by hadoop ColumnFamilyRecordReaders
+ /// </summary>
+ #if !SILVERLIGHT
+ [Serializable]
+ #endif
+ public partial class CfSplit : TBase
+ {
+ private string _start_token;
+ private string _end_token;
+ private long _row_count;
+
+ public string Start_token
+ {
+ get
+ {
+ return _start_token;
+ }
+ set
+ {
+ __isset.start_token = true;
+ this._start_token = value;
+ }
+ }
+
+ public string End_token
+ {
+ get
+ {
+ return _end_token;
+ }
+ set
+ {
+ __isset.end_token = true;
+ this._end_token = value;
+ }
+ }
+
+ public long Row_count
+ {
+ get
+ {
+ return _row_count;
+ }
+ set
+ {
+ __isset.row_count = true;
+ this._row_count = value;
+ }
+ }
+
+
+ public Isset __isset;
+ #if !SILVERLIGHT
+ [Serializable]
+ #endif
+ public struct Isset {
+ public bool start_token;
+ public bool end_token;
+ public bool row_count;
+ }
+
+ public CfSplit() {
+ }
+
+ public void Read (TProtocol iprot)
+ {
+ TField field;
+ iprot.ReadStructBegin();
+ while (true)
+ {
+ field = iprot.ReadFieldBegin();
+ if (field.Type == TType.Stop) {
+ break;
+ }
+ switch (field.ID)
+ {
+ case 1:
+ if (field.Type == TType.String) {
+ Start_token = iprot.ReadString();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ case 2:
+ if (field.Type == TType.String) {
+ End_token = iprot.ReadString();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ case 3:
+ if (field.Type == TType.I64) {
+ Row_count = iprot.ReadI64();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ default:
+ TProtocolUtil.Skip(iprot, field.Type);
+ break;
+ }
+ iprot.ReadFieldEnd();
+ }
+ iprot.ReadStructEnd();
+ }
+
+ public void Write(TProtocol oprot) {
+ TStruct struc = new TStruct("CfSplit");
+ oprot.WriteStructBegin(struc);
+ TField field = new TField();
+ if (Start_token != null && __isset.start_token) {
+ field.Name = "start_token";
+ field.Type = TType.String;
+ field.ID = 1;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteString(Start_token);
+ oprot.WriteFieldEnd();
+ }
+ if (End_token != null && __isset.end_token) {
+ field.Name = "end_token";
+ field.Type = TType.String;
+ field.ID = 2;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteString(End_token);
+ oprot.WriteFieldEnd();
+ }
+ if (__isset.row_count) {
+ field.Name = "row_count";
+ field.Type = TType.I64;
+ field.ID = 3;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteI64(Row_count);
+ oprot.WriteFieldEnd();
+ }
+ oprot.WriteFieldStop();
+ oprot.WriteStructEnd();
+ }
+
+ public override string ToString() {
+ StringBuilder sb = new StringBuilder("CfSplit(");
+ sb.Append("Start_token: ");
+ sb.Append(Start_token);
+ sb.Append(",End_token: ");
+ sb.Append(End_token);
+ sb.Append(",Row_count: ");
+ sb.Append(Row_count);
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ }
+
+}
@@ -17,6 +17,6 @@ namespace FluentCassandra.Apache.Cassandra
{
public class Constants
{
- public static string VERSION = "19.32.0";
+ public static string VERSION = "19.35.0";
}
}
@@ -19,11 +19,12 @@ namespace FluentCassandra.Apache.Cassandra
{
/// <summary>
- /// @Deprecated: use a KeyRange with row_filter in get_range_slices instead
+ /// @deprecated use a KeyRange with row_filter in get_range_slices instead
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
+ [Obsolete("use a KeyRange with row_filter in get_range_slices instead", error: false)]
public partial class IndexClause : TBase
{
private List<IndexExpression> _expressions;
@@ -11,5 +11,6 @@ public enum IndexType
{
KEYS = 0,
CUSTOM = 1,
+ COMPOSITES = 2,
}
}
@@ -70,8 +70,9 @@ public string Strategy_class
}
/// <summary>
- /// @deprecated, ignored
+ /// @deprecated ignored
/// </summary>
+ [Obsolete("ignored by Cassandra 1.2", error:false)]
public int Replication_factor
{
get
@@ -19,11 +19,15 @@ namespace FluentCassandra.Apache.Cassandra
{
/// <summary>
+ /// NOTE: This up outdated exception left for backward compatibility reasons,
+ /// no actual schema agreement validation is done starting from Cassandra 1.2
+ ///
/// schemas are not in agreement across all nodes
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
+ [Obsolete("This up outdated exception left for backward compatibility reasons, no actual schema agreement validation is done starting from Cassandra 1.2", error: false)]
public partial class SchemaDisagreementException : Exception, TBase
{
@@ -26,6 +26,53 @@ namespace FluentCassandra.Apache.Cassandra
#endif
public partial class TimedOutException : Exception, TBase
{
+ private int _acknowledged_by;
+ private bool _acknowledged_by_batchlog;
+
+ /// <summary>
+ /// if a write operation was acknowledged by some replicas but not by enough to
+ /// satisfy the required ConsistencyLevel, the number of successful
+ /// replies will be given here. In case of atomic_batch_mutate method this field
+ /// will be set to -1 if the batch was written to the batchlog and to 0 if it wasn't.
+ /// </summary>
+ public int Acknowledged_by
+ {
+ get
+ {
+ return _acknowledged_by;
+ }
+ set
+ {
+ __isset.acknowledged_by = true;
+ this._acknowledged_by = value;
+ }
+ }
+
+ /// <summary>
+ /// in case of atomic_batch_mutate method this field tells if the batch was written to the batchlog.
+ /// </summary>
+ public bool Acknowledged_by_batchlog
+ {
+ get
+ {
+ return _acknowledged_by_batchlog;
+ }
+ set
+ {
+ __isset.acknowledged_by_batchlog = true;
+ this._acknowledged_by_batchlog = value;
+ }
+ }
+
+
+ public Isset __isset;
+ #if !SILVERLIGHT
+ [Serializable]
+ #endif
+ public struct Isset {
+ public bool acknowledged_by;
+ public bool acknowledged_by_batchlog;
+ }
public TimedOutException() {
}
@@ -42,6 +89,20 @@ public void Read (TProtocol iprot)
}
switch (field.ID)
{
+ case 1:
+ if (field.Type == TType.I32) {
+ Acknowledged_by = iprot.ReadI32();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ case 2:
+ if (field.Type == TType.Bool) {
+ Acknowledged_by_batchlog = iprot.ReadBool();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
@@ -54,12 +115,33 @@ public void Read (TProtocol iprot)
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("TimedOutException");
oprot.WriteStructBegin(struc);
+ TField field = new TField();
+ if (__isset.acknowledged_by) {
+ field.Name = "acknowledged_by";
+ field.Type = TType.I32;
+ field.ID = 1;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteI32(Acknowledged_by);
+ oprot.WriteFieldEnd();
+ }
+ if (__isset.acknowledged_by_batchlog) {
+ field.Name = "acknowledged_by_batchlog";
+ field.Type = TType.Bool;
+ field.ID = 2;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteBool(Acknowledged_by_batchlog);
+ oprot.WriteFieldEnd();
+ }
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
public override string ToString() {
StringBuilder sb = new StringBuilder("TimedOutException(");
+ sb.Append("Acknowledged_by: ");
+ sb.Append(Acknowledged_by);
+ sb.Append(",Acknowledged_by_batchlog: ");
+ sb.Append(Acknowledged_by_batchlog);
sb.Append(")");
return sb.ToString();
}
@@ -59,6 +59,7 @@
<Compile Include="Apache\Cassandra\AuthorizationException.cs" />
<Compile Include="Apache\Cassandra\Cassandra.cs" />
<Compile Include="Apache\Cassandra\CfDef.cs" />
+ <Compile Include="Apache\Cassandra\CfSplit.cs" />
<Compile Include="Apache\Cassandra\Column.cs" />
<Compile Include="Apache\Cassandra\ColumnDef.cs" />
<Compile Include="Apache\Cassandra\ColumnOrSuperColumn.cs" />

0 comments on commit 37584f4

Please sign in to comment.