cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [08/16] git commit: merge from 1.2
Date Thu, 08 Aug 2013 20:52:30 GMT
merge from 1.2


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

Branch: refs/heads/cassandra-2.0.0
Commit: fdfdd5c12ed9dcc85fa85a038b6149d06e26e1be
Parents: f30629b 1143df1
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Aug 8 15:50:08 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Aug 8 15:50:08 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                  |  4 ++++
 src/java/org/apache/cassandra/db/Column.java | 18 +++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdfdd5c1/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 86401d9,30ce976..756e45c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,5 +1,22 @@@
 -1.2.9
 - * add --migrate option to sstableupgrade and sstablescrub (CASSANDRA-5831)
 +2.0.0
 + * fix CAS contention timeout (CASSANDRA-5830)
 + * fix HsHa to respect max frame size (CASSANDRA-4573)
++Merged from 1.2:
++ * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
 +
 +
 +2.0.0-rc1
 + * improve DecimalSerializer performance (CASSANDRA-5837)
 + * fix potential spurious wakeup in AsyncOneResponse (CASSANDRA-5690)
 + * fix schema-related trigger issues (CASSANDRA-5774)
 + * Better validation when accessing CQL3 table from thrift (CASSANDRA-5138)
 + * Fix assertion error during repair (CASSANDRA-5801)
 + * Fix range tombstone bug (CASSANDRA-5805)
 + * DC-local CAS (CASSANDRA-5797)
 + * Add a native_protocol_version column to the system.local table (CASSANRDA-5819)
 + * Use index_interval from cassandra.yaml when upgraded (CASSANDRA-5822)
 + * Fix buffer underflow on socket close (CASSANDRA-5792)
 +Merged from 1.2:
   * fix bulk-loading compressed sstables (CASSANDRA-5820)
   * (Hadoop) fix quoting in CqlPagingRecordReader and CqlRecordWriter 
     (CASSANDRA-5824)
@@@ -26,6 -11,13 +28,8 @@@
     (CASSANDRA-5752)
   * add "all time blocked" to StatusLogger output (CASSANDRA-5825)
   * Future-proof inter-major-version schema migrations (CASSANDRA-5845)
+  * (Hadoop) add CqlPagingRecordReader support for ReversedType in Thrift table
+    (CASSANDRA-5718)
 -Merged from 1.1:
 - * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
 -
 -
 -1.2.8
   * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814)
   * cqlsh: add collections support to COPY (CASSANDRA-5698)
   * retry important messages for any IOException (CASSANDRA-5804)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdfdd5c1/src/java/org/apache/cassandra/db/Column.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/Column.java
index 297b280,412808b..d9e0416
--- a/src/java/org/apache/cassandra/db/Column.java
+++ b/src/java/org/apache/cassandra/db/Column.java
@@@ -24,19 -22,15 +24,20 @@@ import java.net.InetAddress
  import java.nio.ByteBuffer;
  import java.security.MessageDigest;
  import java.util.ArrayList;
 -import java.util.Collection;
 +import java.util.Iterator;
  import java.util.List;
  
 +import com.google.common.collect.AbstractIterator;
 +
  import org.apache.cassandra.config.CFMetaData;
+ import org.apache.cassandra.cql3.CFDefinition;
  import org.apache.cassandra.db.marshal.*;
 +import org.apache.cassandra.io.sstable.Descriptor;
  import org.apache.cassandra.io.util.DataOutputBuffer;
 +import org.apache.cassandra.serializers.MarshalException;
  import org.apache.cassandra.utils.Allocator;
  import org.apache.cassandra.utils.ByteBufferUtil;
 +import org.apache.cassandra.utils.FBUtilities;
  import org.apache.cassandra.utils.HeapAllocator;
  
  /**
@@@ -297,7 -288,23 +298,22 @@@ public class Column implements OnDiskAt
      public void validateFields(CFMetaData metadata) throws MarshalException
      {
          validateName(metadata);
-         AbstractType<?> valueValidator = metadata.getValueValidator(name());
+         CFDefinition cfdef = metadata.getCfDef();
+ 
+         // If this is a CQL table, we need to pull out the CQL column name to look up the
correct column type.
+         // (Note that COMPACT composites are handled by validateName, above.)
+         ByteBuffer internalName;
+         if (cfdef.isComposite && !cfdef.isCompact)
+         {
+             CompositeType comparator = (CompositeType) metadata.comparator;
 -            List<AbstractCompositeType.CompositeComponent> components = comparator.deconstruct(name);
 -            internalName = components.get(components.size() - 1).value;
++            internalName = comparator.extractLastComponent(name);
+         }
+         else
+         {
+             internalName = name;
+         }
+ 
+         AbstractType<?> valueValidator = metadata.getValueValidator(internalName);
          if (valueValidator != null)
              valueValidator.validate(value());
      }


Mime
View raw message