cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: Renames post 4495
Date Mon, 08 Jul 2013 17:39:38 GMT
Renames post 4495


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

Branch: refs/heads/trunk
Commit: fc8b76f79ec725c1082b18a0d6b19bdd080bb033
Parents: 9ec7b80
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Jul 8 19:39:25 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Jul 8 19:39:25 2013 +0200

----------------------------------------------------------------------
 build.xml                                       |   8 +-
 .../org/apache/cassandra/cli/CliClient.java     |   2 +-
 .../org/apache/cassandra/config/CFMetaData.java |   2 +-
 .../apache/cassandra/cql/QueryProcessor.java    |   2 +-
 src/java/org/apache/cassandra/cql/Term.java     |   2 +-
 .../org/apache/cassandra/cql3/Attributes.java   |   2 +-
 .../org/apache/cassandra/cql3/Constants.java    |   2 +-
 src/java/org/apache/cassandra/cql3/Lists.java   |   2 +-
 src/java/org/apache/cassandra/cql3/Maps.java    |   2 +-
 src/java/org/apache/cassandra/cql3/Sets.java    |   2 +-
 .../cql3/statements/SelectStatement.java        |   3 +-
 src/java/org/apache/cassandra/db/Column.java    |   2 +-
 .../org/apache/cassandra/db/CounterColumn.java  |   2 +-
 .../org/apache/cassandra/db/DeletedColumn.java  |   2 +-
 .../org/apache/cassandra/db/ExpiringColumn.java |   2 +-
 .../org/apache/cassandra/db/OnDiskAtom.java     |   2 +-
 .../org/apache/cassandra/db/RangeTombstone.java |   2 +-
 .../cassandra/db/context/CounterContext.java    |   2 +-
 .../db/marshal/AbstractCompositeType.java       |   8 +-
 .../cassandra/db/marshal/AbstractType.java      |   6 +-
 .../apache/cassandra/db/marshal/AsciiType.java  |   8 +-
 .../cassandra/db/marshal/BooleanType.java       |   8 +-
 .../apache/cassandra/db/marshal/BytesType.java  |   8 +-
 .../cassandra/db/marshal/CollectionType.java    |   2 +-
 .../db/marshal/ColumnToCollectionType.java      |   8 +-
 .../cassandra/db/marshal/CompositeType.java     |   2 +-
 .../cassandra/db/marshal/CounterColumnType.java |   8 +-
 .../apache/cassandra/db/marshal/DateType.java   |   9 +-
 .../cassandra/db/marshal/DecimalType.java       |   8 +-
 .../apache/cassandra/db/marshal/DoubleType.java |   8 +-
 .../db/marshal/DynamicCompositeType.java        |   6 +-
 .../apache/cassandra/db/marshal/EmptyType.java  |   8 +-
 .../apache/cassandra/db/marshal/FloatType.java  |   8 +-
 .../cassandra/db/marshal/InetAddressType.java   |   8 +-
 .../apache/cassandra/db/marshal/Int32Type.java  |   8 +-
 .../cassandra/db/marshal/IntegerType.java       |   8 +-
 .../cassandra/db/marshal/LexicalUUIDType.java   |   8 +-
 .../apache/cassandra/db/marshal/ListType.java   |   8 +-
 .../db/marshal/LocalByPartionerType.java        |   6 +-
 .../apache/cassandra/db/marshal/LongType.java   |   8 +-
 .../apache/cassandra/db/marshal/MapType.java    |  10 +-
 .../cassandra/db/marshal/ReversedType.java      |   8 +-
 .../apache/cassandra/db/marshal/SetType.java    |   8 +-
 .../cassandra/db/marshal/TimeUUIDType.java      |   8 +-
 .../cassandra/db/marshal/TimestampType.java     |   8 +-
 .../apache/cassandra/db/marshal/UTF8Type.java   |   8 +-
 .../apache/cassandra/db/marshal/UUIDType.java   |  10 +-
 .../io/sstable/SSTableIdentityIterator.java     |   2 +-
 .../serializers/AbstractTextSerializer.java     |  66 +++++++
 .../cassandra/serializers/AsciiSerializer.java  |  45 +++++
 .../serializers/BooleanSerializer.java          |  73 +++++++
 .../cassandra/serializers/BytesSerializer.java  |  60 ++++++
 .../serializers/CollectionSerializer.java       |  63 ++++++
 .../serializers/DecimalSerializer.java          |  87 +++++++++
 .../cassandra/serializers/DoubleSerializer.java |  68 +++++++
 .../cassandra/serializers/EmptySerializer.java  |  59 ++++++
 .../cassandra/serializers/FloatSerializer.java  |  68 +++++++
 .../serializers/InetAddressSerializer.java      |  74 +++++++
 .../cassandra/serializers/Int32Serializer.java  |  68 +++++++
 .../serializers/IntegerSerializer.java          |  64 ++++++
 .../cassandra/serializers/ListSerializer.java   | 115 +++++++++++
 .../cassandra/serializers/LongSerializer.java   |  68 +++++++
 .../cassandra/serializers/MapSerializer.java    | 126 ++++++++++++
 .../cassandra/serializers/MarshalException.java |  32 +++
 .../cassandra/serializers/SetSerializer.java    | 115 +++++++++++
 .../serializers/TimeUUIDSerializer.java         |  40 ++++
 .../serializers/TimestampSerializer.java        |  97 ++++++++++
 .../cassandra/serializers/TypeSerializer.java   |  36 ++++
 .../cassandra/serializers/UTF8Serializer.java   | 158 +++++++++++++++
 .../cassandra/serializers/UUIDSerializer.java   |  69 +++++++
 .../cassandra/thrift/CassandraServer.java       |   3 +-
 .../cassandra/thrift/ThriftValidation.java      |   2 +-
 .../apache/cassandra/tools/SSTableImport.java   |   2 +-
 .../org/apache/cassandra/tools/Shuffle.java     |   2 +-
 .../cassandra/type/AbstractSerializer.java      |  36 ----
 .../apache/cassandra/type/AsciiSerializer.java  |  80 --------
 .../cassandra/type/BooleanSerializer.java       |  79 --------
 .../apache/cassandra/type/BytesSerializer.java  |  66 -------
 .../cassandra/type/CollectionSerializer.java    |  64 ------
 .../cassandra/type/CounterSerializer.java       |   3 +-
 .../cassandra/type/DecimalSerializer.java       |  94 ---------
 .../apache/cassandra/type/DoubleSerializer.java |  74 -------
 .../apache/cassandra/type/EmptySerializer.java  |  65 -------
 .../apache/cassandra/type/FloatSerializer.java  |  74 -------
 .../cassandra/type/InetAddressSerializer.java   |  80 --------
 .../apache/cassandra/type/Int32Serializer.java  |  74 -------
 .../cassandra/type/IntegerSerializer.java       |  70 -------
 .../apache/cassandra/type/ListSerializer.java   | 115 -----------
 .../apache/cassandra/type/LongSerializer.java   |  74 -------
 .../apache/cassandra/type/MapSerializer.java    | 130 -------------
 .../apache/cassandra/type/MarshalException.java |  32 ---
 .../apache/cassandra/type/SetSerializer.java    | 115 -----------
 .../cassandra/type/TimeUUIDSerializer.java      |  40 ----
 .../cassandra/type/TimestampSerializer.java     | 104 ----------
 .../apache/cassandra/type/UTF8Serializer.java   | 193 -------------------
 .../apache/cassandra/type/UUIDSerializer.java   |  76 --------
 .../cassandra/cql/jdbc/JdbcDecimalTest.java     |   2 +-
 .../cassandra/db/marshal/BytesTypeTest.java     |   2 +-
 .../cassandra/db/marshal/CompositeTypeTest.java |   5 +-
 .../db/marshal/DynamicCompositeTypeTest.java    |   2 +-
 .../cassandra/db/marshal/RoundTripTest.java     |   2 +-
 .../cassandra/db/marshal/TimeUUIDTypeTest.java  |   2 +-
 .../db/marshal/TypeValidationTest.java          |   2 +-
 .../cassandra/serializers/ClientUtilsTest.java  |  71 +++++++
 .../apache/cassandra/type/ClientUtilsTest.java  |  71 -------
 105 files changed, 1865 insertions(+), 1956 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 30ca007..81c3857 100644
--- a/build.xml
+++ b/build.xml
@@ -736,7 +736,7 @@
       <!-- TODO: write maven pom here -->
       <jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}.jar">
         <fileset dir="${build.classes.main}">
-          <include name="org/apache/cassandra/type/*" />
+          <include name="org/apache/cassandra/serializers/*" />
           <include name="org/apache/cassandra/utils/ByteBufferUtil*.class" />
           <include name="org/apache/cassandra/utils/Hex.class" />
           <include name="org/apache/cassandra/utils/UUIDGen*.class" />
@@ -794,7 +794,7 @@
       <create-javadoc destdir="${javadoc.jars.dir}/clientutil">
         <filesets>
           <fileset dir="${build.src.java}" defaultexcludes="yes">
-            <include name="org/apache/cassandra/type/*" />
+            <include name="org/apache/cassandra/serializers/*" />
             <include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
             <include name="org/apache/cassandra/utils/Hex.java" />
             <include name="org/apache/cassandra/utils/UUIDGen*.java" />
@@ -827,7 +827,7 @@
       </jar>
       <jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar">
         <fileset dir="${build.src.java}" defaultexcludes="yes">
-          <include name="org/apache/cassandra/type/*" />
+          <include name="org/apache/cassandra/serializers/*" />
           <include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
           <include name="org/apache/cassandra/utils/Hex.java" />
           <include name="org/apache/cassandra/utils/UUIDGen*.java" />
@@ -1045,7 +1045,7 @@
   -->
   <target name="test-clientutil-jar" depends="build-test,jar" description="Test clientutil jar">
     <junit>
-      <test name="org.apache.cassandra.type.ClientUtilsTest" />
+      <test name="org.apache.cassandra.serializers.ClientUtilsTest" />
       <formatter type="brief" usefile="false" />
       <classpath>
         <pathelement location="${test.classes}" />

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java
index 200c64f..e04b015 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -32,7 +32,7 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Iterables;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.commons.lang.StringUtils;
 
 import org.antlr.runtime.tree.Tree;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 415bc78..f131cda 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -31,7 +31,7 @@ import com.google.common.base.Objects;
 import com.google.common.collect.MapDifference;
 import com.google.common.collect.Maps;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.builder.EqualsBuilder;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/QueryProcessor.java b/src/java/org/apache/cassandra/cql/QueryProcessor.java
index f70effd..f5477ef 100644
--- a/src/java/org/apache/cassandra/cql/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql/QueryProcessor.java
@@ -23,7 +23,7 @@ import java.nio.charset.CharacterCodingException;
 import java.util.*;
 import java.util.concurrent.TimeoutException;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql/Term.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/Term.java b/src/java/org/apache/cassandra/cql/Term.java
index 89d10ab..6e47bfa 100644
--- a/src/java/org/apache/cassandra/cql/Term.java
+++ b/src/java/org/apache/cassandra/cql/Term.java
@@ -26,7 +26,7 @@ import org.apache.cassandra.db.marshal.FloatType;
 import org.apache.cassandra.db.marshal.IntegerType;
 import org.apache.cassandra.db.marshal.LexicalUUIDType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 
 /** A term parsed from a CQL statement. */
 public class Term

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/Attributes.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Attributes.java b/src/java/org/apache/cassandra/cql3/Attributes.java
index 4366ff2..360f54a 100644
--- a/src/java/org/apache/cassandra/cql3/Attributes.java
+++ b/src/java/org/apache/cassandra/cql3/Attributes.java
@@ -24,7 +24,7 @@ import org.apache.cassandra.db.ExpiringColumn;
 import org.apache.cassandra.db.marshal.Int32Type;
 import org.apache.cassandra.db.marshal.LongType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 
 /**
  * Utility class for the Parser to gather attributes for modification

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/Constants.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Constants.java b/src/java/org/apache/cassandra/cql3/Constants.java
index 643c7f3..bcfe00d 100644
--- a/src/java/org/apache/cassandra/cql3/Constants.java
+++ b/src/java/org/apache/cassandra/cql3/Constants.java
@@ -20,7 +20,7 @@ package org.apache.cassandra.cql3;
 import java.nio.ByteBuffer;
 import java.util.List;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/Lists.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Lists.java b/src/java/org/apache/cassandra/cql3/Lists.java
index 4aa0c51..e2a4945 100644
--- a/src/java/org/apache/cassandra/cql3/Lists.java
+++ b/src/java/org/apache/cassandra/cql3/Lists.java
@@ -28,7 +28,7 @@ import org.apache.cassandra.db.marshal.CollectionType;
 import org.apache.cassandra.db.marshal.Int32Type;
 import org.apache.cassandra.db.marshal.ListType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/Maps.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Maps.java b/src/java/org/apache/cassandra/cql3/Maps.java
index 7c62c05..4486dca 100644
--- a/src/java/org/apache/cassandra/cql3/Maps.java
+++ b/src/java/org/apache/cassandra/cql3/Maps.java
@@ -28,7 +28,7 @@ import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.marshal.CollectionType;
 import org.apache.cassandra.db.marshal.MapType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/Sets.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Sets.java b/src/java/org/apache/cassandra/cql3/Sets.java
index 2c31520..3c50db2 100644
--- a/src/java/org/apache/cassandra/cql3/Sets.java
+++ b/src/java/org/apache/cassandra/cql3/Sets.java
@@ -32,7 +32,7 @@ import org.apache.cassandra.db.marshal.CollectionType;
 import org.apache.cassandra.db.marshal.MapType;
 import org.apache.cassandra.db.marshal.SetType;
 import org.apache.cassandra.exceptions.InvalidRequestException;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index b5e4f55..a3cf6d2 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -36,7 +36,6 @@ import org.apache.cassandra.dht.*;
 import org.apache.cassandra.exceptions.*;
 import org.apache.cassandra.service.ClientState;
 import org.apache.cassandra.service.QueryState;
-import org.apache.cassandra.service.RangeSliceVerbHandler;
 import org.apache.cassandra.service.StorageProxy;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.service.pager.*;
@@ -44,7 +43,7 @@ import org.apache.cassandra.db.ConsistencyLevel;
 import org.apache.cassandra.thrift.IndexExpression;
 import org.apache.cassandra.thrift.IndexOperator;
 import org.apache.cassandra.thrift.ThriftValidation;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/Column.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Column.java b/src/java/org/apache/cassandra/db/Column.java
index 99a8b44..297b280 100644
--- a/src/java/org/apache/cassandra/db/Column.java
+++ b/src/java/org/apache/cassandra/db/Column.java
@@ -33,7 +33,7 @@ import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.marshal.*;
 import org.apache.cassandra.io.sstable.Descriptor;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.Allocator;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/CounterColumn.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CounterColumn.java b/src/java/org/apache/cassandra/db/CounterColumn.java
index 6e08166..2993485 100644
--- a/src/java/org/apache/cassandra/db/CounterColumn.java
+++ b/src/java/org/apache/cassandra/db/CounterColumn.java
@@ -25,7 +25,7 @@ import java.util.Set;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Sets;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/DeletedColumn.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DeletedColumn.java b/src/java/org/apache/cassandra/db/DeletedColumn.java
index b30ed2f..377df27 100644
--- a/src/java/org/apache/cassandra/db/DeletedColumn.java
+++ b/src/java/org/apache/cassandra/db/DeletedColumn.java
@@ -23,7 +23,7 @@ import java.security.MessageDigest;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.Allocator;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.HeapAllocator;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/ExpiringColumn.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ExpiringColumn.java b/src/java/org/apache/cassandra/db/ExpiringColumn.java
index 0bef266..e11567f 100644
--- a/src/java/org/apache/cassandra/db/ExpiringColumn.java
+++ b/src/java/org/apache/cassandra/db/ExpiringColumn.java
@@ -24,7 +24,7 @@ import java.security.MessageDigest;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.Allocator;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.HeapAllocator;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/OnDiskAtom.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/OnDiskAtom.java b/src/java/org/apache/cassandra/db/OnDiskAtom.java
index 06e9b5a..2956d6b 100644
--- a/src/java/org/apache/cassandra/db/OnDiskAtom.java
+++ b/src/java/org/apache/cassandra/db/OnDiskAtom.java
@@ -24,7 +24,7 @@ import java.security.MessageDigest;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.io.ISSTableSerializer;
 import org.apache.cassandra.io.sstable.Descriptor;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public interface OnDiskAtom

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/RangeTombstone.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RangeTombstone.java b/src/java/org/apache/cassandra/db/RangeTombstone.java
index ec1f215..cac50e8 100644
--- a/src/java/org/apache/cassandra/db/RangeTombstone.java
+++ b/src/java/org/apache/cassandra/db/RangeTombstone.java
@@ -28,7 +28,7 @@ import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.io.ISSTableSerializer;
 import org.apache.cassandra.io.sstable.Descriptor;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.Interval;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/context/CounterContext.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/context/CounterContext.java b/src/java/org/apache/cassandra/db/context/CounterContext.java
index ef57c4a..e73a5e6 100644
--- a/src/java/org/apache/cassandra/db/context/CounterContext.java
+++ b/src/java/org/apache/cassandra/db/context/CounterContext.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
index e354de0..0626ef5 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
@@ -17,9 +17,9 @@
  */
 package org.apache.cassandra.db.marshal;
 
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.BytesSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.BytesSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
@@ -330,7 +330,7 @@ public abstract class AbstractCompositeType extends AbstractType<ByteBuffer>
     }
 
     @Override
-    public AbstractSerializer<ByteBuffer> asComposer()
+    public TypeSerializer<ByteBuffer> getSerializer()
     {
         return BytesSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/AbstractType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/AbstractType.java b/src/java/org/apache/cassandra/db/marshal/AbstractType.java
index c9e94b7..82068f3 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractType.java
@@ -31,8 +31,8 @@ import org.apache.cassandra.exceptions.SyntaxException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.OnDiskAtom;
 import org.apache.cassandra.db.RangeTombstone;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 import static org.apache.cassandra.io.sstable.IndexHelper.IndexInfo;
@@ -162,7 +162,7 @@ public abstract class AbstractType<T> implements Comparator<ByteBuffer>
         return new CQL3Type.Custom(this);
     }
 
-    public abstract AbstractSerializer<T> asComposer();
+    public abstract TypeSerializer<T> getSerializer();
 
     /** @deprecated use reverseComparator field instead */
     public Comparator<ByteBuffer> getReverseComparator()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/AsciiType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/AsciiType.java b/src/java/org/apache/cassandra/db/marshal/AsciiType.java
index 09e562c..fb96aff 100644
--- a/src/java/org/apache/cassandra/db/marshal/AsciiType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AsciiType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.AsciiSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.AsciiSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 
 public class AsciiType extends AbstractType<String>
 {
@@ -65,7 +65,7 @@ public class AsciiType extends AbstractType<String>
         return CQL3Type.Native.ASCII;
     }
 
-    public AbstractSerializer<String> asComposer()
+    public TypeSerializer<String> getSerializer()
     {
         return AsciiSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/BooleanType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/BooleanType.java b/src/java/org/apache/cassandra/db/marshal/BooleanType.java
index 307664f..95c6de0 100644
--- a/src/java/org/apache/cassandra/db/marshal/BooleanType.java
+++ b/src/java/org/apache/cassandra/db/marshal/BooleanType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.BooleanSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.BooleanSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 
 public class BooleanType extends AbstractType<Boolean>
 {
@@ -79,7 +79,7 @@ public class BooleanType extends AbstractType<Boolean>
   }
 
     @Override
-    public AbstractSerializer<Boolean> asComposer()
+    public TypeSerializer<Boolean> getSerializer()
     {
         return BooleanSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/BytesType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/BytesType.java b/src/java/org/apache/cassandra/db/marshal/BytesType.java
index 571e6e7..6601af3 100644
--- a/src/java/org/apache/cassandra/db/marshal/BytesType.java
+++ b/src/java/org/apache/cassandra/db/marshal/BytesType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.BytesSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.BytesSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.Hex;
 
@@ -91,7 +91,7 @@ public class BytesType extends AbstractType<ByteBuffer>
     }
 
     @Override
-    public AbstractSerializer<ByteBuffer> asComposer()
+    public TypeSerializer<ByteBuffer> getSerializer()
     {
         return BytesSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/CollectionType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/CollectionType.java b/src/java/org/apache/cassandra/db/marshal/CollectionType.java
index 7b2bce2..f922d56 100644
--- a/src/java/org/apache/cassandra/db/marshal/CollectionType.java
+++ b/src/java/org/apache/cassandra/db/marshal/CollectionType.java
@@ -22,7 +22,7 @@ import java.util.List;
 
 import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.db.Column;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.Pair;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/ColumnToCollectionType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/ColumnToCollectionType.java b/src/java/org/apache/cassandra/db/marshal/ColumnToCollectionType.java
index fa9705b..7dda157 100644
--- a/src/java/org/apache/cassandra/db/marshal/ColumnToCollectionType.java
+++ b/src/java/org/apache/cassandra/db/marshal/ColumnToCollectionType.java
@@ -25,9 +25,9 @@ import com.google.common.collect.ImmutableMap;
 
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.BytesSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.BytesSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class ColumnToCollectionType extends AbstractType<ByteBuffer>
@@ -106,7 +106,7 @@ public class ColumnToCollectionType extends AbstractType<ByteBuffer>
         throw new UnsupportedOperationException("ColumnToCollectionType should only be used in composite types, never alone");
     }
 
-    public AbstractSerializer<ByteBuffer> asComposer()
+    public TypeSerializer<ByteBuffer> getSerializer()
     {
         return BytesSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/CompositeType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/CompositeType.java b/src/java/org/apache/cassandra/db/marshal/CompositeType.java
index 6a25d14..640fea7 100644
--- a/src/java/org/apache/cassandra/db/marshal/CompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/CompositeType.java
@@ -34,7 +34,7 @@ import org.apache.cassandra.exceptions.SyntaxException;
 import org.apache.cassandra.cql3.ColumnNameBuilder;
 import org.apache.cassandra.cql3.Relation;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 /*

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/CounterColumnType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/CounterColumnType.java b/src/java/org/apache/cassandra/db/marshal/CounterColumnType.java
index 4a84ece..ef1ffc6 100644
--- a/src/java/org/apache/cassandra/db/marshal/CounterColumnType.java
+++ b/src/java/org/apache/cassandra/db/marshal/CounterColumnType.java
@@ -21,9 +21,9 @@ import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.CounterSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.CounterSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class CounterColumnType extends AbstractCommutativeType
@@ -69,7 +69,7 @@ public class CounterColumnType extends AbstractCommutativeType
         return CQL3Type.Native.COUNTER;
     }
 
-    public AbstractSerializer<Long> asComposer()
+    public TypeSerializer<Long> getSerializer()
     {
         return CounterSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/DateType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 7de69e8..f97067a 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -25,10 +25,9 @@ import java.util.Date;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.TimestampSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.TimestampSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.commons.lang.time.DateUtils;
 
@@ -140,7 +139,7 @@ public class DateType extends AbstractType<Date>
         TimestampSerializer.instance.validate(bytes);
     }
 
-    public AbstractSerializer<Date> asComposer()
+    public TypeSerializer<Date> getSerializer()
     {
         return TimestampSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/DecimalType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DecimalType.java b/src/java/org/apache/cassandra/db/marshal/DecimalType.java
index e213703..230df51 100644
--- a/src/java/org/apache/cassandra/db/marshal/DecimalType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DecimalType.java
@@ -21,9 +21,9 @@ import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.DecimalSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.DecimalSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class DecimalType extends AbstractType<BigDecimal>
@@ -95,7 +95,7 @@ public class DecimalType extends AbstractType<BigDecimal>
     }
 
     @Override
-    public AbstractSerializer<BigDecimal> asComposer()
+    public TypeSerializer<BigDecimal> getSerializer()
     {
         return DecimalSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/DoubleType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DoubleType.java b/src/java/org/apache/cassandra/db/marshal/DoubleType.java
index 89f11af..4ff4db6 100644
--- a/src/java/org/apache/cassandra/db/marshal/DoubleType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DoubleType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.DoubleSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.DoubleSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class DoubleType extends AbstractType<Double>
@@ -90,7 +90,7 @@ public class DoubleType extends AbstractType<Double>
     }
 
     @Override
-    public AbstractSerializer<Double> asComposer()
+    public TypeSerializer<Double> getSerializer()
     {
         return DoubleSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java b/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
index b00a026..b68505e 100644
--- a/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
@@ -24,8 +24,8 @@ import java.util.Map;
 
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 /*
@@ -362,7 +362,7 @@ public class DynamicCompositeType extends AbstractCompositeType
         }
 
         @Override
-        public AbstractSerializer<Void> asComposer()
+        public TypeSerializer<Void> getSerializer()
         {
             throw new UnsupportedOperationException();
         }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/EmptyType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/EmptyType.java b/src/java/org/apache/cassandra/db/marshal/EmptyType.java
index 0ad704f..74cf3fe 100644
--- a/src/java/org/apache/cassandra/db/marshal/EmptyType.java
+++ b/src/java/org/apache/cassandra/db/marshal/EmptyType.java
@@ -19,9 +19,9 @@ package org.apache.cassandra.db.marshal;
 
 import java.nio.ByteBuffer;
 
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.EmptySerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.EmptySerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 /**
@@ -67,7 +67,7 @@ public class EmptyType extends AbstractType<Void>
         EmptySerializer.instance.validate(bytes);
     }
 
-    public AbstractSerializer<Void> asComposer()
+    public TypeSerializer<Void> getSerializer()
     {
         return EmptySerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/FloatType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/FloatType.java b/src/java/org/apache/cassandra/db/marshal/FloatType.java
index c0940f4..6b9782e 100644
--- a/src/java/org/apache/cassandra/db/marshal/FloatType.java
+++ b/src/java/org/apache/cassandra/db/marshal/FloatType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.FloatSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.FloatSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 
@@ -89,7 +89,7 @@ public class FloatType extends AbstractType<Float>
     }
 
     @Override
-    public AbstractSerializer<Float> asComposer()
+    public TypeSerializer<Float> getSerializer()
     {
         return FloatSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/InetAddressType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/InetAddressType.java b/src/java/org/apache/cassandra/db/marshal/InetAddressType.java
index a86f578..fa5ce95 100644
--- a/src/java/org/apache/cassandra/db/marshal/InetAddressType.java
+++ b/src/java/org/apache/cassandra/db/marshal/InetAddressType.java
@@ -21,9 +21,9 @@ import java.net.InetAddress;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.InetAddressSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.InetAddressSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class InetAddressType extends AbstractType<InetAddress>
@@ -83,7 +83,7 @@ public class InetAddressType extends AbstractType<InetAddress>
     }
 
     @Override
-    public AbstractSerializer<InetAddress> asComposer()
+    public TypeSerializer<InetAddress> getSerializer()
     {
         return InetAddressSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/Int32Type.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/Int32Type.java b/src/java/org/apache/cassandra/db/marshal/Int32Type.java
index 0ec7240..ec05cb1 100644
--- a/src/java/org/apache/cassandra/db/marshal/Int32Type.java
+++ b/src/java/org/apache/cassandra/db/marshal/Int32Type.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.Int32Serializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.Int32Serializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class Int32Type extends AbstractType<Integer>
@@ -98,7 +98,7 @@ public class Int32Type extends AbstractType<Integer>
     }
 
     @Override
-    public AbstractSerializer<Integer> asComposer()
+    public TypeSerializer<Integer> getSerializer()
     {
         return Int32Serializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/IntegerType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/IntegerType.java b/src/java/org/apache/cassandra/db/marshal/IntegerType.java
index 7fed5f6..d602442 100644
--- a/src/java/org/apache/cassandra/db/marshal/IntegerType.java
+++ b/src/java/org/apache/cassandra/db/marshal/IntegerType.java
@@ -21,9 +21,9 @@ import java.math.BigInteger;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.IntegerSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.IntegerSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public final class IntegerType extends AbstractType<BigInteger>
@@ -162,7 +162,7 @@ public final class IntegerType extends AbstractType<BigInteger>
     }
 
     @Override
-    public AbstractSerializer<BigInteger> asComposer()
+    public TypeSerializer<BigInteger> getSerializer()
     {
         return IntegerSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/LexicalUUIDType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/LexicalUUIDType.java b/src/java/org/apache/cassandra/db/marshal/LexicalUUIDType.java
index dacd81b..d1a6590 100644
--- a/src/java/org/apache/cassandra/db/marshal/LexicalUUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/LexicalUUIDType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 import java.util.UUID;
 
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
-import org.apache.cassandra.type.UUIDSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.UUIDSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 
@@ -85,7 +85,7 @@ public class LexicalUUIDType extends AbstractType<UUID>
     }
 
     @Override
-    public AbstractSerializer<UUID> asComposer()
+    public TypeSerializer<UUID> getSerializer()
     {
         return UUIDSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/ListType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/ListType.java b/src/java/org/apache/cassandra/db/marshal/ListType.java
index 49e7319..93c4dae 100644
--- a/src/java/org/apache/cassandra/db/marshal/ListType.java
+++ b/src/java/org/apache/cassandra/db/marshal/ListType.java
@@ -23,8 +23,8 @@ import java.util.*;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.ListSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.ListSerializer;
 import org.apache.cassandra.utils.Pair;
 
 public class ListType<T> extends CollectionType<List<T>>
@@ -59,7 +59,7 @@ public class ListType<T> extends CollectionType<List<T>>
     {
         super(Kind.LIST);
         this.elements = elements;
-        this.composer = ListSerializer.getInstance(elements.asComposer());
+        this.composer = ListSerializer.getInstance(elements.getSerializer());
     }
 
     public AbstractType<UUID> nameComparator()
@@ -89,7 +89,7 @@ public class ListType<T> extends CollectionType<List<T>>
         return composer.deserialize(value);
     }
 
-    public AbstractSerializer<List<T>> asComposer()
+    public TypeSerializer<List<T>> getSerializer()
     {
         return composer;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/LocalByPartionerType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/LocalByPartionerType.java b/src/java/org/apache/cassandra/db/marshal/LocalByPartionerType.java
index 62b5d9f..22b5214 100644
--- a/src/java/org/apache/cassandra/db/marshal/LocalByPartionerType.java
+++ b/src/java/org/apache/cassandra/db/marshal/LocalByPartionerType.java
@@ -19,8 +19,8 @@ package org.apache.cassandra.db.marshal;
 
 import java.nio.ByteBuffer;
 
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.commons.lang.NotImplementedException;
 
 import org.apache.cassandra.db.RowPosition;
@@ -70,7 +70,7 @@ public class LocalByPartionerType<T extends Token> extends AbstractType<ByteBuff
         throw new IllegalStateException("You shouldn't be validating this.");
     }
 
-    public AbstractSerializer<ByteBuffer> asComposer()
+    public TypeSerializer<ByteBuffer> getSerializer()
     {
         throw new UnsupportedOperationException("You can't do this with a local partitioner.");
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/LongType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/LongType.java b/src/java/org/apache/cassandra/db/marshal/LongType.java
index 2570418..262265f 100644
--- a/src/java/org/apache/cassandra/db/marshal/LongType.java
+++ b/src/java/org/apache/cassandra/db/marshal/LongType.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.LongSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.LongSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
 public class LongType extends AbstractType<Long>
@@ -100,7 +100,7 @@ public class LongType extends AbstractType<Long>
     }
 
     @Override
-    public AbstractSerializer<Long> asComposer()
+    public TypeSerializer<Long> getSerializer()
     {
         return LongSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/MapType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/MapType.java b/src/java/org/apache/cassandra/db/marshal/MapType.java
index fc51189..6d20166 100644
--- a/src/java/org/apache/cassandra/db/marshal/MapType.java
+++ b/src/java/org/apache/cassandra/db/marshal/MapType.java
@@ -24,9 +24,9 @@ import java.util.*;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MapSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MapSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.Pair;
 
 public class MapType<K, V> extends CollectionType<Map<K, V>>
@@ -64,7 +64,7 @@ public class MapType<K, V> extends CollectionType<Map<K, V>>
         super(Kind.MAP);
         this.keys = keys;
         this.values = values;
-        this.composer = MapSerializer.getInstance(keys.asComposer(), values.asComposer());
+        this.composer = MapSerializer.getInstance(keys.getSerializer(), values.getSerializer());
     }
 
     public AbstractType<K> nameComparator()
@@ -133,7 +133,7 @@ public class MapType<K, V> extends CollectionType<Map<K, V>>
     }
 
     @Override
-    public AbstractSerializer<Map<K, V>> asComposer()
+    public TypeSerializer<Map<K, V>> getSerializer()
     {
         return composer;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/ReversedType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/ReversedType.java b/src/java/org/apache/cassandra/db/marshal/ReversedType.java
index d7816a7..b111fa6 100644
--- a/src/java/org/apache/cassandra/db/marshal/ReversedType.java
+++ b/src/java/org/apache/cassandra/db/marshal/ReversedType.java
@@ -25,8 +25,8 @@ import java.util.List;
 import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
 
 public class ReversedType<T> extends AbstractType<T>
 {
@@ -106,9 +106,9 @@ public class ReversedType<T> extends AbstractType<T>
     }
 
     @Override
-    public AbstractSerializer<T> asComposer()
+    public TypeSerializer<T> getSerializer()
     {
-        return baseType.asComposer();
+        return baseType.getSerializer();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/SetType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/SetType.java b/src/java/org/apache/cassandra/db/marshal/SetType.java
index 89ddc7d..4979e17 100644
--- a/src/java/org/apache/cassandra/db/marshal/SetType.java
+++ b/src/java/org/apache/cassandra/db/marshal/SetType.java
@@ -23,8 +23,8 @@ import java.util.*;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.SetSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.SetSerializer;
 import org.apache.cassandra.utils.Pair;
 
 public class SetType<T> extends CollectionType<Set<T>>
@@ -59,7 +59,7 @@ public class SetType<T> extends CollectionType<Set<T>>
     {
         super(Kind.SET);
         this.elements = elements;
-        this.composer = SetSerializer.getInstance(elements.asComposer());
+        this.composer = SetSerializer.getInstance(elements.getSerializer());
     }
 
     public AbstractType<T> nameComparator()
@@ -82,7 +82,7 @@ public class SetType<T> extends CollectionType<Set<T>>
         return composer.deserialize(value);
     }
 
-    public AbstractSerializer<Set<T>> asComposer()
+    public TypeSerializer<Set<T>> getSerializer()
     {
         return composer;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
index 61b02a5..d4f145e 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
@@ -22,9 +22,9 @@ import java.util.UUID;
 import java.util.regex.Pattern;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
-import org.apache.cassandra.type.TimeUUIDSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.TimeUUIDSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 
@@ -176,7 +176,7 @@ public class TimeUUIDType extends AbstractType<UUID>
     }
 
     @Override
-    public AbstractSerializer<UUID> asComposer()
+    public TypeSerializer<UUID> getSerializer()
     {
         return TimeUUIDSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/TimestampType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/TimestampType.java b/src/java/org/apache/cassandra/db/marshal/TimestampType.java
index ee2140c..c525bdf 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimestampType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimestampType.java
@@ -25,9 +25,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
-import org.apache.cassandra.type.TimestampSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.commons.lang.time.DateUtils;
 
@@ -138,7 +138,7 @@ public class TimestampType extends AbstractType<Date>
         return CQL3Type.Native.TIMESTAMP;
     }
 
-    public AbstractSerializer<Date> asComposer()
+    public TypeSerializer<Date> getSerializer()
     {
         return TimestampSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/UTF8Type.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/UTF8Type.java b/src/java/org/apache/cassandra/db/marshal/UTF8Type.java
index 2663195..33284d7 100644
--- a/src/java/org/apache/cassandra/db/marshal/UTF8Type.java
+++ b/src/java/org/apache/cassandra/db/marshal/UTF8Type.java
@@ -20,9 +20,9 @@ package org.apache.cassandra.db.marshal;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
-import org.apache.cassandra.type.UTF8Serializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.UTF8Serializer;
 
 public class UTF8Type extends AbstractType<String>
 {
@@ -74,7 +74,7 @@ public class UTF8Type extends AbstractType<String>
     }
 
     @Override
-    public AbstractSerializer<String> asComposer()
+    public TypeSerializer<String> getSerializer()
     {
         return UTF8Serializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/db/marshal/UUIDType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/UUIDType.java b/src/java/org/apache/cassandra/db/marshal/UUIDType.java
index 73021ee..21e20b7 100644
--- a/src/java/org/apache/cassandra/db/marshal/UUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/UUIDType.java
@@ -23,14 +23,14 @@ import java.text.ParseException;
 import java.util.UUID;
 
 import org.apache.cassandra.cql3.CQL3Type;
-import org.apache.cassandra.type.AbstractSerializer;
-import org.apache.cassandra.type.MarshalException;
-import org.apache.cassandra.type.UUIDSerializer;
+import org.apache.cassandra.serializers.TypeSerializer;
+import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.UUIDSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.lang.time.DateUtils;
 
-import static org.apache.cassandra.type.TimestampSerializer.iso8601Patterns;
+import static org.apache.cassandra.serializers.TimestampSerializer.iso8601Patterns;
 
 /**
  * Compares UUIDs using the following criteria:<br>
@@ -240,7 +240,7 @@ public class UUIDType extends AbstractType<UUID>
     }
 
     @Override
-    public AbstractSerializer<UUID> asComposer()
+    public TypeSerializer<UUID> getSerializer()
     {
         return UUIDSerializer.instance;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
index 02dedaf..01dc38a 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
@@ -20,7 +20,7 @@ package org.apache.cassandra.io.sstable;
 import java.io.*;
 import java.util.Iterator;
 
-import org.apache.cassandra.type.MarshalException;
+import org.apache.cassandra.serializers.MarshalException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/AbstractTextSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/AbstractTextSerializer.java b/src/java/org/apache/cassandra/serializers/AbstractTextSerializer.java
new file mode 100644
index 0000000..a132ce4
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/AbstractTextSerializer.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+
+public abstract class AbstractTextSerializer implements TypeSerializer<String>
+{
+    private final Charset charset;
+
+    protected AbstractTextSerializer(Charset charset)
+    {
+        this.charset = charset;
+    }
+
+    public String serialize(ByteBuffer bytes)
+    {
+        return getString(bytes);
+    }
+
+    public ByteBuffer deserialize(String value)
+    {
+        return ByteBufferUtil.bytes(value, charset);
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        try
+        {
+            return ByteBufferUtil.string(bytes, charset);
+        }
+        catch (CharacterCodingException e)
+        {
+            throw new MarshalException("Invalid " + charset + " bytes " + ByteBufferUtil.bytesToHex(bytes));
+        }
+    }
+
+    public String toString(String value)
+    {
+        return value;
+    }
+
+    public Class<String> getType()
+    {
+        return String.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/AsciiSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/AsciiSerializer.java b/src/java/org/apache/cassandra/serializers/AsciiSerializer.java
new file mode 100644
index 0000000..352c906
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/AsciiSerializer.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+
+public class AsciiSerializer extends AbstractTextSerializer
+{
+    public static final AsciiSerializer instance = new AsciiSerializer();
+
+    private AsciiSerializer()
+    {
+        super(Charset.forName("US-ASCII"));
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        // 0-127
+        for (int i = bytes.position(); i < bytes.limit(); i++)
+        {
+            byte b = bytes.get(i);
+            if (b < 0 || b > 127)
+                throw new MarshalException("Invalid byte for ascii: " + Byte.toString(b));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/BooleanSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/BooleanSerializer.java b/src/java/org/apache/cassandra/serializers/BooleanSerializer.java
new file mode 100644
index 0000000..f2add98
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/BooleanSerializer.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+
+public class BooleanSerializer implements TypeSerializer<Boolean>
+{
+    private static final ByteBuffer TRUE = ByteBuffer.wrap(new byte[] {1});
+    private static final ByteBuffer FALSE = ByteBuffer.wrap(new byte[] {0});
+
+    public static final BooleanSerializer instance = new BooleanSerializer();
+
+    public Boolean serialize(ByteBuffer bytes)
+    {
+        byte value = bytes.get(bytes.position());
+        return value != 0;
+    }
+
+    public ByteBuffer deserialize(Boolean value)
+    {
+        return (value == null) ? ByteBufferUtil.EMPTY_BYTE_BUFFER
+                : value ? TRUE : FALSE; // false
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        if (bytes.remaining() != 1 && bytes.remaining() != 0)
+            throw new MarshalException(String.format("Expected 1 or 0 byte value (%d)", bytes.remaining()));
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        if (bytes.remaining() == 0)
+        {
+            return Boolean.FALSE.toString();
+        }
+        if (bytes.remaining() != 1)
+        {
+            throw new MarshalException("A boolean is stored in exactly 1 byte: " + bytes.remaining());
+        }
+        byte value = bytes.get(bytes.position());
+
+        return value == 0 ? Boolean.FALSE.toString() : Boolean.TRUE.toString();
+    }
+
+    public String toString(Boolean value)
+    {
+        return value == null ? "" : value.toString();
+    }
+
+    public Class<Boolean> getType()
+    {
+        return Boolean.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/BytesSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/BytesSerializer.java b/src/java/org/apache/cassandra/serializers/BytesSerializer.java
new file mode 100644
index 0000000..6504f84
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/BytesSerializer.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+
+public class BytesSerializer implements TypeSerializer<ByteBuffer>
+{
+    public static final BytesSerializer instance = new BytesSerializer();
+
+    public ByteBuffer serialize(ByteBuffer bytes)
+    {
+        // We make a copy in case the user modifies the input
+        return bytes.duplicate();
+    }
+
+    public ByteBuffer deserialize(ByteBuffer value)
+    {
+        // This is from the DB, so it is not shared with someone else
+        return value;
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        // all bytes are legal.
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        return ByteBufferUtil.bytesToHex(bytes);
+    }
+
+    public String toString(ByteBuffer value)
+    {
+        return getString(value);
+    }
+
+    public Class<ByteBuffer> getType()
+    {
+        return ByteBuffer.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/CollectionSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/CollectionSerializer.java b/src/java/org/apache/cassandra/serializers/CollectionSerializer.java
new file mode 100644
index 0000000..563e88b
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/CollectionSerializer.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+
+public abstract class CollectionSerializer<T> implements TypeSerializer<T>
+{
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        // The collection is not currently being properly validated.
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        return BytesSerializer.instance.getString(bytes);
+    }
+
+    // Utilitary method
+    protected static ByteBuffer pack(List<ByteBuffer> buffers, int elements, int size)
+    {
+        ByteBuffer result = ByteBuffer.allocate(2 + size);
+        result.putShort((short)elements);
+        for (ByteBuffer bb : buffers)
+        {
+            result.putShort((short)bb.remaining());
+            result.put(bb.duplicate());
+        }
+        return (ByteBuffer)result.flip();
+    }
+
+    public static ByteBuffer pack(List<ByteBuffer> buffers, int elements)
+    {
+        int size = 0;
+        for (ByteBuffer bb : buffers)
+            size += 2 + bb.remaining();
+        return pack(buffers, elements, size);
+    }
+
+
+    protected static int getUnsignedShort(ByteBuffer bb)
+    {
+        int length = (bb.get() & 0xFF) << 8;
+        return length | (bb.get() & 0xFF);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/DecimalSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/DecimalSerializer.java b/src/java/org/apache/cassandra/serializers/DecimalSerializer.java
new file mode 100644
index 0000000..21031b0
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/DecimalSerializer.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+
+public class DecimalSerializer implements TypeSerializer<BigDecimal>
+{
+    public static final DecimalSerializer instance = new DecimalSerializer();
+
+    public BigDecimal serialize(ByteBuffer bytes)
+    {
+        if (bytes == null)
+            return null;
+
+        // do not consume the contents of the ByteBuffer
+        bytes = bytes.duplicate();
+        int scale = bytes.getInt();
+        byte[] bibytes = new byte[bytes.remaining()];
+        bytes.get(bibytes);
+
+        BigInteger bi = new BigInteger(bibytes);
+        return new BigDecimal(bi, scale);
+    }
+
+    public ByteBuffer deserialize(BigDecimal value)
+    {
+        if (value == null)
+            return ByteBufferUtil.EMPTY_BYTE_BUFFER;
+
+        BigInteger bi = value.unscaledValue();
+        Integer scale = value.scale();
+        byte[] bibytes = bi.toByteArray();
+        byte[] sbytes = ByteBufferUtil.bytes(scale).array();
+        byte[] bytes = new byte[bi.toByteArray().length + 4];
+
+        for (int i = 0; i < 4; i++)
+            bytes[i] = sbytes[i];
+        for (int i = 4; i < bibytes.length + 4; i++)
+            bytes[i] = bibytes[i - 4];
+
+        return ByteBuffer.wrap(bytes);
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        // no useful check for invalid decimals.
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        if (bytes.remaining() == 0)
+        {
+            return "";
+        }
+        return serialize(bytes).toPlainString();
+    }
+
+    public String toString(BigDecimal value)
+    {
+        return value == null ? "" : value.toPlainString();
+    }
+
+    public Class<BigDecimal> getType()
+    {
+        return BigDecimal.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/DoubleSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/DoubleSerializer.java b/src/java/org/apache/cassandra/serializers/DoubleSerializer.java
new file mode 100644
index 0000000..9fbd627
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/DoubleSerializer.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+
+public class DoubleSerializer implements TypeSerializer<Double>
+{
+    public static final DoubleSerializer instance = new DoubleSerializer();
+
+    public Double serialize(ByteBuffer bytes)
+    {
+        return ByteBufferUtil.toDouble(bytes);
+    }
+
+    public ByteBuffer deserialize(Double value)
+    {
+        return (value == null) ? ByteBufferUtil.EMPTY_BYTE_BUFFER : ByteBufferUtil.bytes(value);
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        if (bytes.remaining() != 8 && bytes.remaining() != 0)
+            throw new MarshalException(String.format("Expected 8 or 0 byte value for a double (%d)", bytes.remaining()));
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        if (bytes.remaining() == 0)
+        {
+            return "";
+        }
+        if (bytes.remaining() != 8)
+        {
+            throw new MarshalException("A double is exactly 8 bytes : " + bytes.remaining());
+        }
+
+        return String.valueOf(ByteBufferUtil.toDouble(bytes));
+    }
+
+    public String toString(Double value)
+    {
+        return value == null ? "" : value.toString();
+    }
+
+    public Class<Double> getType()
+    {
+        return Double.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/EmptySerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/EmptySerializer.java b/src/java/org/apache/cassandra/serializers/EmptySerializer.java
new file mode 100644
index 0000000..2e082b6
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/EmptySerializer.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+
+public class EmptySerializer implements TypeSerializer<Void>
+{
+    public static final EmptySerializer instance = new EmptySerializer();
+
+    public Void serialize(ByteBuffer bytes)
+    {
+        return null;
+    }
+
+    public ByteBuffer deserialize(Void value)
+    {
+        return ByteBufferUtil.EMPTY_BYTE_BUFFER;
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        if (bytes.remaining() > 0)
+            throw new MarshalException("EmptyType only accept empty values");
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        return "";
+    }
+
+    public String toString(Void value)
+    {
+        return "";
+    }
+
+    public Class<Void> getType()
+    {
+        return Void.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/FloatSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/FloatSerializer.java b/src/java/org/apache/cassandra/serializers/FloatSerializer.java
new file mode 100644
index 0000000..35fc528
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/FloatSerializer.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.nio.ByteBuffer;
+
+public class FloatSerializer implements TypeSerializer<Float>
+{
+    public static final FloatSerializer instance = new FloatSerializer();
+
+    public Float serialize(ByteBuffer bytes)
+    {
+        return ByteBufferUtil.toFloat(bytes);
+    }
+
+    public ByteBuffer deserialize(Float value)
+    {
+        return (value == null) ? ByteBufferUtil.EMPTY_BYTE_BUFFER : ByteBufferUtil.bytes(value);
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        if (bytes.remaining() != 4 && bytes.remaining() != 0)
+            throw new MarshalException(String.format("Expected 4 or 0 byte value for a float (%d)", bytes.remaining()));
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        if (bytes.remaining() == 0)
+        {
+            return "";
+        }
+        if (bytes.remaining() != 4)
+        {
+            throw new MarshalException("A float is exactly 4 bytes : " + bytes.remaining());
+        }
+
+        return String.valueOf(ByteBufferUtil.toFloat(bytes));
+    }
+
+    public String toString(Float value)
+    {
+        return value == null ? "" : String.valueOf(value);
+    }
+
+    public Class<Float> getType()
+    {
+        return Float.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc8b76f7/src/java/org/apache/cassandra/serializers/InetAddressSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/serializers/InetAddressSerializer.java b/src/java/org/apache/cassandra/serializers/InetAddressSerializer.java
new file mode 100644
index 0000000..39d9a9e
--- /dev/null
+++ b/src/java/org/apache/cassandra/serializers/InetAddressSerializer.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.serializers;
+
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+
+public class InetAddressSerializer implements TypeSerializer<InetAddress>
+{
+    public static final InetAddressSerializer instance = new InetAddressSerializer();
+
+    public InetAddress serialize(ByteBuffer bytes)
+    {
+        try
+        {
+            return InetAddress.getByAddress(ByteBufferUtil.getArray(bytes));
+        }
+        catch (UnknownHostException e)
+        {
+            throw new AssertionError(e);
+        }
+    }
+
+    public ByteBuffer deserialize(InetAddress value)
+    {
+        return ByteBuffer.wrap(value.getAddress());
+    }
+
+    public void validate(ByteBuffer bytes) throws MarshalException
+    {
+        try
+        {
+            InetAddress.getByAddress(ByteBufferUtil.getArray(bytes));
+        }
+        catch (UnknownHostException e)
+        {
+            throw new MarshalException(String.format("Expected 4 or 16 byte inetaddress; got %s", ByteBufferUtil.bytesToHex(bytes)));
+        }
+    }
+
+    public String getString(ByteBuffer bytes)
+    {
+        return serialize(bytes).getHostAddress();
+    }
+
+    public String toString(InetAddress value)
+    {
+        return value.getHostAddress();
+    }
+
+    public Class<InetAddress> getType()
+    {
+        return InetAddress.class;
+    }
+}


Mime
View raw message