cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [16/50] [abbrv] git commit: TimeUUID support in CassandraStorage. Patch by brandonwilliams, reviewed by Rick Branson for CASSANDRA-3327
Date Thu, 05 Jan 2012 20:00:29 GMT
TimeUUID support in CassandraStorage.
Patch by brandonwilliams, reviewed by Rick Branson for CASSANDRA-3327

git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.8@1220926 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5cdfaab7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5cdfaab7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5cdfaab7

Branch: refs/heads/trunk
Commit: 5cdfaab72c6c8a2a9fab0d1a97fd1cdeafd6c2df
Parents: 0860058
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Dec 19 20:11:40 2011 +0000
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Dec 19 20:11:40 2011 +0000

----------------------------------------------------------------------
 .../cassandra/hadoop/pig/CassandraStorage.java     |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cdfaab7/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
----------------------------------------------------------------------
diff --git a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index f3510b0..fd0959d 100644
--- a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -27,6 +27,7 @@ import org.apache.cassandra.db.marshal.IntegerType;
 import org.apache.cassandra.db.marshal.TypeParser;
 import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -171,6 +172,8 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface,
Lo
            pair.set(position, ((BigInteger) value).intValue());
        else if (value instanceof ByteBuffer)
            pair.set(position, new DataByteArray(ByteBufferUtil.getArray((ByteBuffer) value)));
+       else if (value instanceof UUID)
+           pair.set(position, new DataByteArray(UUIDGen.decompose((java.util.UUID) value)));
        else
            pair.set(position, value);
     }


Mime
View raw message