Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 24637 invoked from network); 7 May 2010 01:55:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 01:55:11 -0000 Received: (qmail 24750 invoked by uid 500); 7 May 2010 01:55:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 24736 invoked by uid 500); 7 May 2010 01:55:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 24728 invoked by uid 99); 7 May 2010 01:55:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 01:55:10 +0000 X-ASF-Spam-Status: No, hits=-1399.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 01:55:09 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o471snZG019853 for ; Fri, 7 May 2010 01:54:49 GMT Message-ID: <32781206.22121273197289546.JavaMail.jira@thor> Date: Thu, 6 May 2010 21:54:49 -0400 (EDT) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Resolved: (CASSANDRA-1048) A column value is not updated via Thrift 0.2.0 API (C#) In-Reply-To: <499617.26361272933235702.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis resolved CASSANDRA-1048. --------------------------------------- Resolution: Invalid > A column value is not updated via Thrift 0.2.0 API (C#) > -------------------------------------------------------- > > Key: CASSANDRA-1048 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1048 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 0.6.1 > Environment: Windows Server 2003 R2 32-bit, JRE 6, Cassandra 0.6.1, Thrift 0.2.0, MS VS 2008/.NET 3.5 > Reporter: Alexander S > Attachments: storage-conf.xml > > > Hello all, > Please forgive me, if the issue I am describing is not a bug, but rather my lack of knowledge. I have just started playing with Cassandra and at this moment I am stuck. > I am a .NET developer and have very little experience with Java. This is why I decided to use Thrift generated C# classes in order to communicate with Cassandra. It appears I can insert columns, but I cannot updated them using C# interface. At the same time I can do it successfully using cassandra-cli. Let me provide some details: > // Inserting column: > long tStamp = DateTime.Now.Millisecond; > //Insert the data into the column 'name' > client.insert("Keyspace1", > "Test", > nameColumnPath, > utf8Encoding.GetBytes("Value"), > tStamp, > ConsistencyLevel.ONE); > ColumnOrSuperColumn returnedCol = new ColumnOrSuperColumn(); > returnedCol = client.get("Keyspace1", "Test", nameColumnPath, ConsistencyLevel.ONE); > Console.WriteLine("Column Data in Keyspace1/Standard1: name: {0}, value: {1}", > utf8Encoding.GetString(returnedCol.Column.Name), > utf8Encoding.GetString(returnedCol.Column.Value)); > // Column Data in Keyspace1/Standard1: name: name, value: Value > // update same column: > Console.WriteLine("Update column value"); > //Insert the data into the column 'name' > client.insert("Keyspace1", > "Test", > nameColumnPath, > utf8Encoding.GetBytes("Value updated"), > tStamp, > ConsistencyLevel.ONE); > returnedCol = client.get("Keyspace1", "Test", nameColumnPath, ConsistencyLevel.ONE); > Console.WriteLine("Column Data in Keyspace1/Standard1: name: {0}, value: {1}", > utf8Encoding.GetString(returnedCol.Column.Name), > utf8Encoding.GetString(returnedCol.Column.Value)); > //Column Data in Keyspace1/Standard1: name: name, value: Value (it has NOT been changed!!!) > Now I try achieve same results with cassandra-cli: > cassandra> set Keyspace1.Standard1['Test']['name']='Value' > Value inserted. > cassandra> get Keyspace1.Standard1['Test'] > => (column=6e616d65, value=Value, timestamp=1272932956231000) > Returned 1 results. > cassandra> set Keyspace1.Standard1['Test']['name']='Value updated' > Value inserted. > cassandra> get Keyspace1.Standard1['Test'] > => (column=6e616d65, value=Value updated, timestamp=1272932970637000) > Returned 1 results. > cassandra> > As you can see it works. > It doesn't matter if timestamps values are different for C# example. I tried it too. > Thank you very much. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.