cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1127625 - /cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
Date Wed, 25 May 2011 18:45:04 GMT
Author: brandonwilliams
Date: Wed May 25 18:45:03 2011
New Revision: 1127625

URL: http://svn.apache.org/viewvc?rev=1127625&view=rev
Log:
Fix setting of timestamps and remove extra mutation in pig.
Patch by brandonwilliams, reviewed by Jeremy Hanna for CASSANDRA-2706

Modified:
    cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java

Modified: cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java?rev=1127625&r1=1127624&r2=1127625&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
(original)
+++ cassandra/branches/cassandra-0.8.0/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
Wed May 25 18:45:03 2011
@@ -361,14 +361,14 @@ public class CassandraStorage extends Lo
                        org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();
                        column.name = objToBB(subcol.get(0));
                        column.value = objToBB(subcol.get(1));
-                       column.timestamp = System.currentTimeMillis() * 1000;
+                       column.setTimestamp(System.currentTimeMillis() * 1000);
                        columns.add(column);
                    }
                    if (columns.isEmpty()) // a deletion
                    {
                        mutation.deletion = new org.apache.cassandra.thrift.Deletion();
                        mutation.deletion.super_column = objToBB(pair.get(0));
-                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
+                       mutation.deletion.setTimestamp(System.currentTimeMillis() * 1000);
                    }
                    else
                    {
@@ -384,7 +384,7 @@ public class CassandraStorage extends Lo
                        mutation.deletion = new org.apache.cassandra.thrift.Deletion();
                        mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();
                        mutation.deletion.predicate.column_names = Arrays.asList(objToBB(pair.get(0)));
-                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
+                       mutation.deletion.setTimestamp(System.currentTimeMillis() * 1000);
                    }
                    else
                    {
@@ -398,10 +398,9 @@ public class CassandraStorage extends Lo
                                column.value = marshallers.get(1).decompose(pair.get(1));
                        else
                            column.value = validators.get(column.name).decompose(pair.get(1));
-                       column.timestamp = System.currentTimeMillis() * 1000;
+                       column.setTimestamp(System.currentTimeMillis() * 1000);
                        mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                        mutation.column_or_supercolumn.column = column;
-                       mutationList.add(mutation);
                    }
                }
                mutationList.add(mutation);



Mime
View raw message