cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r987677 - in /cassandra/trunk: interface/cassandra.genavro src/java/org/apache/cassandra/avro/CassandraServer.java test/system/test_avro_server.py
Date Sat, 21 Aug 2010 00:26:36 GMT
Author: eevans
Date: Sat Aug 21 00:26:35 2010
New Revision: 987677

URL: http://svn.apache.org/viewvc?rev=987677&view=rev
Log:
avro implementation of describe_partitioner()

Patch by eevans

Modified:
    cassandra/trunk/interface/cassandra.genavro
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
    cassandra/trunk/test/system/test_avro_server.py

Modified: cassandra/trunk/interface/cassandra.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=987677&r1=987676&r2=987677&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Sat Aug 21 00:26:35 2010
@@ -233,4 +233,6 @@ protocol Cassandra {
     string describe_cluster_name();
 
     string describe_version();
+
+    string describe_partitioner();
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=987677&r1=987676&r2=987677&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Sat Aug 21 00:26:35
2010
@@ -952,4 +952,10 @@ public class CassandraServer implements 
             throw ex;
         }
     }
+
+    @Override
+    public CharSequence describe_partitioner() throws AvroRemoteException
+    {
+        return StorageService.getPartitioner().getClass().getName();
+    }
 }

Modified: cassandra/trunk/test/system/test_avro_server.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_avro_server.py?rev=987677&r1=987676&r2=987677&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_avro_server.py (original)
+++ cassandra/trunk/test/system/test_avro_server.py Sat Aug 21 00:26:35 2010
@@ -335,6 +335,12 @@ class TestRpcOperations(AvroTester):
         segs = vers.split('.')
         assert len(segs) == 3 and len([i for i in segs if i.isdigit()]) == 3, \
                "incorrect api version format: " + vers
+
+    def test_describe_partitioner(self):
+        "getting the partitioner"
+        part = "org.apache.cassandra.dht.CollatingOrderPreservingPartitioner"
+        result = self.client.request('describe_partitioner', {})
+        assert result == part, "got %s, expected %s" % (result, part)
               
     def test_system_column_family_operations(self):
         "adding, renaming, and removing column families"



Mime
View raw message