You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by xe...@apache.org on 2014/09/18 07:35:43 UTC
[2/3] git commit: Merge branch cassandra-2.0 into cassandra-2.1
Merge branch cassandra-2.0 into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8026163d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8026163d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8026163d
Branch: refs/heads/trunk
Commit: 8026163decf3af2a0984b387acc01cfdfe44c926
Parents: ad89d44 85aa794
Author: Pavel Yaskevich <xe...@apache.org>
Authored: Wed Sep 17 22:34:19 2014 -0700
Committer: Pavel Yaskevich <xe...@apache.org>
Committed: Wed Sep 17 22:34:19 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/RowIndexEntry.java | 16 ++++-
.../apache/cassandra/db/RowIndexEntryTest.java | 69 ++++++++++++++++++++
3 files changed, 85 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8026163d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index cc8c691,58c6647..47d5591
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,96 -1,9 +1,97 @@@
-2.0.11:
+2.1.1
+ * Invalidate prepared statements when their keyspace or table is
+ dropped (CASSANDRA-7566)
+ * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
+ * Fix saving caches when a table is dropped (CASSANDRA-7784)
+ * Add better error checking of new stress profile (CASSANDRA-7716)
+ * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934)
+ * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
+ * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
+ * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916)
+ * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173)
+ * Add human readable option to nodetool commands (CASSANDRA-5433)
+ * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
+ * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
+ * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
+ * (cqlsh) Support for query paging (CASSANDRA-7514)
+ * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
+ * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
+ * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
+ * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
+ * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
+ * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
+ * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
+ output (CASSANDRA-7659)
+ * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
+ * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
+ * Support list index operations with conditions (CASSANDRA-7499)
+ * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
+ * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
+ * (cqlsh) Error when tracing query (CASSANDRA-7613)
+ * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
+ * SSTableExport uses correct validator to create string representation of partition
+ keys (CASSANDRA-7498)
+ * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
+ * Add support for custom 2i validation (CASSANDRA-7575)
+ * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
+ * Add listen_interface and rpc_interface options (CASSANDRA-7417)
+ * Improve schema merge performance (CASSANDRA-7444)
+ * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
+ * Optimise NativeCell comparisons (CASSANDRA-6755)
+ * Configurable client timeout for cqlsh (CASSANDRA-7516)
+ * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
+ * Make repair -pr work with -local (CASSANDRA-7450)
+Merged from 2.0:
++ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
* Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
* Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
- * Explicitly disallowing mixing multi-column and single-column
+ * Explicitly disallow mixing multi-column and single-column
relations on clustering columns (CASSANDRA-7711)
* Better error message when condition is set on PK column (CASSANDRA-7804)
+ * Don't send schema change responses and events for no-op DDL
+ statements (CASSANDRA-7600)
+ * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)
+ * Throw InvalidRequestException when queries contain relations on entire
+ collection columns (CASSANDRA-7506)
+ * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577)
+ * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252)
+ * (cqlsh) cqlsh should automatically disable tracing when selecting
+ from system_traces (CASSANDRA-7641)
+ * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
+ * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
+ * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
+ * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
+ * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
+ * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611)
+ * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345)
+ * cqlsh fails when version number parts are not int (CASSANDRA-7524)
+Merged from 1.2:
+ * Don't index tombstones (CASSANDRA-7828)
+ * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788)
+
+
+2.1.0
+ * (cqlsh) Removed "ALTER TYPE <name> RENAME TO <name>" from tab-completion
+ (CASSANDRA-7895)
+ * Fixed IllegalStateException in anticompaction (CASSANDRA-7892)
+ * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863)
+ * Avoid exposing internal classes over JMX (CASSANDRA-7879)
+ * Add null check for keys when freezing collection (CASSANDRA-7869)
+ * Improve stress workload realism (CASSANDRA-7519)
+
+
+2.1.0-rc7
+ * Add frozen keyword and require UDT to be frozen (CASSANDRA-7857)
+ * Track added sstable size correctly (CASSANDRA-7239)
+ * (cqlsh) Fix case insensitivity (CASSANDRA-7834)
+ * Fix failure to stream ranges when moving (CASSANDRA-7836)
+ * Correctly remove tmplink files (CASSANDRA-7803)
+ * (cqlsh) Fix column name formatting for functions, CAS operations,
+ and UDT field selections (CASSANDRA-7806)
+ * (cqlsh) Fix COPY FROM handling of null/empty primary key
+ values (CASSANDRA-7792)
+ * Fix ordering of static cells (CASSANDRA-7763)
+Merged from 2.0:
* Forbid re-adding dropped counter columns (CASSANDRA-7831)
* Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832)
* Always reject inequality on the partition key without token()
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8026163d/src/java/org/apache/cassandra/db/RowIndexEntry.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/RowIndexEntry.java
index 05c563c,cdafd5d..01035c4
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@@ -150,11 -155,6 +150,25 @@@ public class RowIndexEntry implements I
FileUtils.skipBytesFully(in, size);
}
+
+ public int serializedSize(RowIndexEntry rie)
+ {
- return TypeSizes.NATIVE.sizeof(rie.position) + rie.promotedSize(type);
++ int size = TypeSizes.NATIVE.sizeof(rie.position) + TypeSizes.NATIVE.sizeof(rie.promotedSize(type));
++
++ if (rie.isIndexed())
++ {
++ List<IndexHelper.IndexInfo> index = rie.columnsIndex();
++
++ size += DeletionTime.serializer.serializedSize(rie.deletionTime(), TypeSizes.NATIVE);
++ size += TypeSizes.NATIVE.sizeof(index.size());
++
++ ISerializer<IndexHelper.IndexInfo> idxSerializer = type.indexSerializer();
++ for (IndexHelper.IndexInfo info : index)
++ size += idxSerializer.serializedSize(info, TypeSizes.NATIVE);
++ }
++
++ return size;
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8026163d/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
index 0000000,9728f1f..237573e
mode 000000,100644..100644
--- a/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
+++ b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
@@@ -1,0 -1,64 +1,69 @@@
+ /*
+ * 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.db;
+
+ import java.io.IOException;
+
+ import junit.framework.Assert;
+ import org.apache.cassandra.SchemaLoader;
+ import org.apache.cassandra.config.DatabaseDescriptor;
++import org.apache.cassandra.db.composites.CellNames;
++import org.apache.cassandra.db.composites.SimpleDenseCellNameType;
++import org.apache.cassandra.db.marshal.UTF8Type;
+ import org.apache.cassandra.io.util.DataOutputBuffer;
+ import org.apache.cassandra.utils.ByteBufferUtil;
+ import org.apache.cassandra.utils.FBUtilities;
+ import org.junit.Test;
+
+ public class RowIndexEntryTest extends SchemaLoader
+ {
+ @Test
+ public void testSerializedSize() throws IOException
+ {
+ final RowIndexEntry simple = new RowIndexEntry(123);
+
+ DataOutputBuffer buffer = new DataOutputBuffer();
- RowIndexEntry.serializer.serialize(simple, buffer);
++ RowIndexEntry.Serializer serializer = new RowIndexEntry.Serializer(new SimpleDenseCellNameType(UTF8Type.instance));
+
- Assert.assertEquals(buffer.size(), simple.serializedSize());
++ serializer.serialize(simple, buffer);
++
++ Assert.assertEquals(buffer.getLength(), serializer.serializedSize(simple));
+
+ buffer = new DataOutputBuffer();
+ ColumnFamily cf = ArrayBackedSortedColumns.factory.create("Keyspace1", "Standard1");
+ ColumnIndex columnIndex = new ColumnIndex.Builder(cf, ByteBufferUtil.bytes("a"), new DataOutputBuffer())
+ {{
+ int idx = 0, size = 0;
- Column column;
++ Cell column;
+ do
+ {
- column = new Column(ByteBufferUtil.bytes("c" + idx++), ByteBufferUtil.bytes("v"), FBUtilities.timestampMicros());
- size += column.serializedSize(TypeSizes.NATIVE);
++ column = new BufferCell(CellNames.simpleDense(ByteBufferUtil.bytes("c" + idx++)), ByteBufferUtil.bytes("v"), FBUtilities.timestampMicros());
++ size += column.serializedSize(new SimpleDenseCellNameType(UTF8Type.instance), TypeSizes.NATIVE);
+
+ add(column);
+ }
+ while (size < DatabaseDescriptor.getColumnIndexSize() * 3);
+
+ }}.build();
+
+ RowIndexEntry withIndex = RowIndexEntry.create(0xdeadbeef, DeletionTime.LIVE, columnIndex);
+
- RowIndexEntry.serializer.serialize(withIndex, buffer);
- Assert.assertEquals(buffer.size(), withIndex.serializedSize());
++ serializer.serialize(withIndex, buffer);
++ Assert.assertEquals(buffer.getLength(), serializer.serializedSize(withIndex));
+ }
+ }