cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r948949 - /cassandra/trunk/contrib/word_count/src/WordCountSetup.java
Date Thu, 27 May 2010 18:58:11 GMT
Author: jbellis
Date: Thu May 27 18:58:10 2010
New Revision: 948949

URL: http://svn.apache.org/viewvc?rev=948949&view=rev
Log:
update wordcount to use Clocks.  patch by jhanna

Modified:
    cassandra/trunk/contrib/word_count/src/WordCountSetup.java

Modified: cassandra/trunk/contrib/word_count/src/WordCountSetup.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/contrib/word_count/src/WordCountSetup.java?rev=948949&r1=948948&r2=948949&view=diff
==============================================================================
--- cassandra/trunk/contrib/word_count/src/WordCountSetup.java (original)
+++ cassandra/trunk/contrib/word_count/src/WordCountSetup.java Thu May 27 18:58:10 2010
@@ -47,13 +47,13 @@ public class WordCountSetup
         Column c;
 
         // text1: 1 row, 1 word
-        c = new Column("text1".getBytes(), "word1".getBytes(), System.currentTimeMillis());
+        c = new Column("text1".getBytes(), "word1".getBytes(), new Clock(System.currentTimeMillis()));
         mutationMap = getMutationMap("key0".getBytes(), WordCount.COLUMN_FAMILY, c);
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);
         logger.info("added text1");
 
         // text1: 1 row, 2 word
-        c = new Column("text2".getBytes(), "word1 word2".getBytes(), System.currentTimeMillis());
+        c = new Column("text2".getBytes(), "word1 word2".getBytes(), new Clock(System.currentTimeMillis()));
         mutationMap = getMutationMap("key0".getBytes(), WordCount.COLUMN_FAMILY, c);
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);
         logger.info("added text2");
@@ -62,7 +62,7 @@ public class WordCountSetup
         mutationMap = new HashMap<byte[],Map<String,List<Mutation>>>();
         for (int i=0; i<1000; i++)
         {
-            c = new Column("text3".getBytes(), "word1".getBytes(), System.currentTimeMillis());
+            c = new Column("text3".getBytes(), "word1".getBytes(), new Clock(System.currentTimeMillis()));
             addToMutationMap(mutationMap, ("key" + i).getBytes(), WordCount.COLUMN_FAMILY,
c);
         }
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);



Mime
View raw message