cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1095263 - in /cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra: MovementTest.java TestBase.java
Date Wed, 20 Apr 2011 04:28:49 GMT
Author: jbellis
Date: Wed Apr 20 04:28:48 2011
New Revision: 1095263

URL: http://svn.apache.org/viewvc?rev=1095263&view=rev
Log:
update MovementTest and TestBase for new Column constructor
patch by stuhood; reviewed by jbellis for CASSANDRA-2517

Modified:
    cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/MovementTest.java
    cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/TestBase.java

Modified: cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/MovementTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/MovementTest.java?rev=1095263&r1=1095262&r2=1095263&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/MovementTest.java
(original)
+++ cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/MovementTest.java
Wed Apr 20 04:28:48 2011
@@ -50,16 +50,12 @@ public class MovementTest extends TestBa
     private static Map<ByteBuffer,List<ColumnOrSuperColumn>> insertBatch(Cassandra.Client
client) throws Exception
     {
         final int N = 1000;
-        Column col1 = new Column(
-            ByteBufferUtil.bytes("c1"),
-            ByteBufferUtil.bytes("v1"),
-            0
-            );
-        Column col2 = new Column(
-            ByteBufferUtil.bytes("c2"),
-            ByteBufferUtil.bytes("v2"),
-            0
-            );
+        Column col1 = new Column(ByteBufferUtil.bytes("c1"))
+            .setValue(ByteBufferUtil.bytes("v1"))
+            .setTimestamp(0);
+        Column col2 = new Column(ByteBufferUtil.bytes("c2"))
+            .setValue(ByteBufferUtil.bytes("v2"))
+            .setTimestamp(0);
 
         // build N rows
         Map<ByteBuffer,List<ColumnOrSuperColumn>> rows = new HashMap<ByteBuffer,
List<ColumnOrSuperColumn>>();

Modified: cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/TestBase.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/TestBase.java?rev=1095263&r1=1095262&r2=1095263&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/TestBase.java (original)
+++ cassandra/branches/cassandra-0.8/test/distributed/org/apache/cassandra/TestBase.java Wed
Apr 20 04:28:48 2011
@@ -149,11 +149,9 @@ public abstract class TestBase
     protected void insert(Cassandra.Client client, ByteBuffer key, String cf, String name,
String value, long timestamp, ConsistencyLevel cl)
         throws InvalidRequestException, UnavailableException, TimedOutException, TException
     {
-        Column col = new Column(
-             ByteBuffer.wrap(name.getBytes()),
-             ByteBuffer.wrap(value.getBytes()),
-             timestamp
-             );
+        Column col = new Column(ByteBuffer.wrap(name.getBytes()))
+            .setValue(ByteBuffer.wrap(value.getBytes()))
+            .setTimestamp(timestamp);
         client.insert(key, new ColumnParent(cf), col, cl);
     }
 



Mime
View raw message