cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [02/26] cassandra git commit: Thrift removal
Date Tue, 13 Dec 2016 09:27:26 GMT
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/db/composites/CTypeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/composites/CTypeTest.java b/test/unit/org/apache/cassandra/db/composites/CTypeTest.java
index 9b261e6..999417e 100644
--- a/test/unit/org/apache/cassandra/db/composites/CTypeTest.java
+++ b/test/unit/org/apache/cassandra/db/composites/CTypeTest.java
@@ -30,42 +30,42 @@ public class CTypeTest
     {
         CompositeType baseType = CompositeType.getInstance(AsciiType.instance, UUIDType.instance, LongType.instance);
 
-        ByteBuffer a1 = baseType.builder()
-                .add(ByteBufferUtil.bytes("a"))
-                .add(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"))
-                .add(ByteBufferUtil.bytes(1)).build();
-        ByteBuffer a2 = baseType.builder()
-                .add(ByteBufferUtil.bytes("a"))
-                .add(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"))
-                .add(ByteBufferUtil.bytes(100)).build();
-        ByteBuffer b1 = baseType.builder()
-                .add(ByteBufferUtil.bytes("a"))
-                .add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"))
-                .add(ByteBufferUtil.bytes(1)).build();
-        ByteBuffer b2 = baseType.builder()
-                .add(ByteBufferUtil.bytes("a"))
-                .add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"))
-                .add(ByteBufferUtil.bytes(100)).build();
-        ByteBuffer c1 = baseType.builder()
-                .add(ByteBufferUtil.bytes("z"))
-                .add(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"))
-                .add(ByteBufferUtil.bytes(1)).build();
-        ByteBuffer c2 = baseType.builder()
-                .add(ByteBufferUtil.bytes("z"))
-                .add(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"))
-                .add(ByteBufferUtil.bytes(100)).build();
-        ByteBuffer d1 = baseType.builder()
-                .add(ByteBufferUtil.bytes("z"))
-                .add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"))
-                .add(ByteBufferUtil.bytes(1)).build();
-        ByteBuffer d2 = baseType.builder()
-                .add(ByteBufferUtil.bytes("z"))
-                .add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"))
-                .add(ByteBufferUtil.bytes(100)).build();
-        ByteBuffer z1 = baseType.builder()
-                .add(ByteBufferUtil.EMPTY_BYTE_BUFFER)
-                .add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"))
-                .add(ByteBufferUtil.bytes(100)).build();
+        ByteBuffer a1 = CompositeType.build(
+                ByteBufferUtil.bytes("a"),
+                UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"),
+                ByteBufferUtil.bytes(1));
+        ByteBuffer a2 = CompositeType.build(
+                ByteBufferUtil.bytes("a"),
+                UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"),
+                ByteBufferUtil.bytes(100));
+        ByteBuffer b1 = CompositeType.build(
+                ByteBufferUtil.bytes("a"),
+                UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+                ByteBufferUtil.bytes(1));
+        ByteBuffer b2 = CompositeType.build(
+                ByteBufferUtil.bytes("a"),
+                UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+                ByteBufferUtil.bytes(100));
+        ByteBuffer c1 = CompositeType.build(
+                ByteBufferUtil.bytes("z"),
+                UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"),
+                ByteBufferUtil.bytes(1));
+        ByteBuffer c2 = CompositeType.build(
+                ByteBufferUtil.bytes("z"),
+                UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"),
+                ByteBufferUtil.bytes(100));
+        ByteBuffer d1 = CompositeType.build(
+                ByteBufferUtil.bytes("z"),
+                UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+                ByteBufferUtil.bytes(1));
+        ByteBuffer d2 = CompositeType.build(
+                ByteBufferUtil.bytes("z"),
+                UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+                ByteBufferUtil.bytes(100));
+        ByteBuffer z1 = CompositeType.build(
+                ByteBufferUtil.EMPTY_BYTE_BUFFER,
+                UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"),
+                ByteBufferUtil.bytes(100));
 
         assert baseType.compare(a1,a2) < 0;
         assert baseType.compare(a2,b1) < 0;
@@ -105,8 +105,8 @@ public class CTypeTest
     public void testSimpleType2()
     {
         CompositeType baseType = CompositeType.getInstance(UUIDType.instance);
-        ByteBuffer a = baseType.builder().add(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000")).build();
-        ByteBuffer z = baseType.builder().add(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff")).build();
+        ByteBuffer a = CompositeType.build(UUIDType.instance.fromString("00000000-0000-0000-0000-000000000000"));
+        ByteBuffer z = CompositeType.build(UUIDType.instance.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"));
 
         assert baseType.compare(a,z) < 0;
         assert baseType.compare(z,a) > 0;
@@ -118,8 +118,8 @@ public class CTypeTest
     public void testSimpleType1()
     {
         CompositeType baseType = CompositeType.getInstance(BytesType.instance);
-        ByteBuffer a = baseType.builder().add(ByteBufferUtil.bytes("a")).build();
-        ByteBuffer z = baseType.builder().add(ByteBufferUtil.bytes("z")).build();
+        ByteBuffer a = CompositeType.build(ByteBufferUtil.bytes("a"));
+        ByteBuffer z = CompositeType.build(ByteBufferUtil.bytes("z"));
 
         assert baseType.compare(a,z) < 0;
         assert baseType.compare(z,a) > 0;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java b/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
index cc66e71..2bf4082 100644
--- a/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
+++ b/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
@@ -38,6 +38,7 @@ import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.SyntaxException;
 import org.apache.cassandra.schema.KeyspaceParams;
 import org.apache.cassandra.serializers.MarshalException;
+import org.apache.cassandra.serializers.UTF8Serializer;
 import org.apache.cassandra.utils.*;
 
 public class CompositeTypeTest
@@ -261,13 +262,14 @@ public class CompositeTypeTest
             new String[]{ "foo!", "b:ar" },
         };
 
+
         for (String[] input : inputs)
         {
-            CompositeType.Builder builder = new CompositeType.Builder(comp);
-            for (String part : input)
-                builder.add(UTF8Type.instance.fromString(part));
+            ByteBuffer[] bbs = new ByteBuffer[input.length];
+            for (int i = 0; i < input.length; i++)
+                bbs[i] = UTF8Type.instance.fromString(input[i]);
 
-            ByteBuffer value = comp.fromString(comp.getString(builder.build()));
+            ByteBuffer value = comp.fromString(comp.getString(CompositeType.build(bbs)));
             ByteBuffer[] splitted = comp.split(value);
             for (int i = 0; i < splitted.length; i++)
                 assertEquals(input[i], UTF8Type.instance.getString(splitted[i]));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/hadoop/ColumnFamilyInputFormatTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/hadoop/ColumnFamilyInputFormatTest.java b/test/unit/org/apache/cassandra/hadoop/ColumnFamilyInputFormatTest.java
deleted file mode 100644
index d4261bf..0000000
--- a/test/unit/org/apache/cassandra/hadoop/ColumnFamilyInputFormatTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.cassandra.hadoop;
-/*
- *
- * 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.
- *
- */
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cassandra.thrift.SlicePredicate;
-import org.apache.cassandra.utils.ByteBufferUtil;
-import org.apache.hadoop.conf.Configuration;
-import org.junit.Test;
-
-public class ColumnFamilyInputFormatTest
-{
-    @Test
-    public void testSlicePredicate()
-    {
-        long columnValue = 1271253600000l;
-        ByteBuffer columnBytes = ByteBufferUtil.bytes(columnValue);
-
-        List<ByteBuffer> columnNames = new ArrayList<ByteBuffer>();
-        columnNames.add(columnBytes);
-        SlicePredicate originalPredicate = new SlicePredicate().setColumn_names(columnNames);
-
-        Configuration conf = new Configuration();
-        ConfigHelper.setInputSlicePredicate(conf, originalPredicate);
-
-        SlicePredicate rtPredicate = ConfigHelper.getInputSlicePredicate(conf);
-        assert rtPredicate.column_names.size() == 1;
-        assert originalPredicate.column_names.get(0).equals(rtPredicate.column_names.get(0));
-    }
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java b/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
index 0b4e9e2..deb7747 100644
--- a/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
@@ -70,7 +70,6 @@ import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.serializers.TypeSerializer;
 import org.apache.cassandra.service.MigrationManager;
 import org.apache.cassandra.service.QueryState;
-import org.apache.cassandra.thrift.CqlRow;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
@@ -2377,7 +2376,7 @@ public class SASIIndexTest
                                                             FBUtilities.nowInSeconds(),
                                                             columnFilter,
                                                             filter,
-                                                            DataLimits.thriftLimits(maxResults, DataLimits.NO_LIMIT),
+                                                            DataLimits.cqlLimits(maxResults),
                                                             range,
                                                             Optional.empty());
 
@@ -2438,18 +2437,11 @@ public class SASIIndexTest
 
     private Set<String> executeCQLWithKeys(String rawStatement) throws Exception
     {
-        SelectStatement statement = (SelectStatement) QueryProcessor.parseStatement(rawStatement).prepare().statement;
-        ResultMessage.Rows cqlRows = statement.executeInternal(QueryState.forInternalCalls(), QueryOptions.DEFAULT);
-
         Set<String> results = new TreeSet<>();
-        for (CqlRow row : cqlRows.toThriftResult().getRows())
+        for (UntypedResultSet.Row row : QueryProcessor.executeOnceInternal(rawStatement))
         {
-            for (org.apache.cassandra.thrift.Column col : row.columns)
-            {
-                String columnName = UTF8Type.instance.getString(col.bufferForName());
-                if (columnName.equals("id"))
-                    results.add(AsciiType.instance.getString(col.bufferForValue()));
-            }
+            if (row.has("id"))
+                results.add(row.getString("id"));
         }
 
         return results;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/io/sstable/SSTableCorruptionDetectionTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableCorruptionDetectionTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableCorruptionDetectionTest.java
index 88ed52e..1f2221e 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableCorruptionDetectionTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableCorruptionDetectionTest.java
@@ -210,7 +210,7 @@ public class SSTableCorruptionDetectionTest extends SSTableWriterTestBase
             for (int i = 0; i < numberOfPks; i++)
             {
                 DecoratedKey dk = Util.dk(String.format("pkvalue_%07d", i));
-                try (UnfilteredRowIterator rowIter = sstable.iterator(dk, Slices.ALL, ColumnFilter.all(cfs.metadata), false, false))
+                try (UnfilteredRowIterator rowIter = sstable.iterator(dk, Slices.ALL, ColumnFilter.all(cfs.metadata), false))
                 {
                     while (rowIter.hasNext())
                     {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/io/sstable/SSTableScannerTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableScannerTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableScannerTest.java
index 594efe9..930db50 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableScannerTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableScannerTest.java
@@ -182,7 +182,7 @@ public class SSTableScannerTest
         assert boundaries.length % 2 == 0;
         for (DataRange range : dataRanges(sstable.metadata, scanStart, scanEnd))
         {
-            try(ISSTableScanner scanner = sstable.getScanner(ColumnFilter.all(sstable.metadata), range, false))
+            try(ISSTableScanner scanner = sstable.getScanner(ColumnFilter.all(sstable.metadata), range))
             {
                 for (int b = 0; b < boundaries.length; b += 2)
                     for (int i = boundaries[b]; i <= boundaries[b + 1]; i++)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
index 1c7d61f..1a50d70 100644
--- a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
@@ -223,7 +223,7 @@ public class SSTableWriterTest extends SSTableWriterTestBase
             try
             {
                 DecoratedKey dk = Util.dk("large_value");
-                UnfilteredRowIterator rowIter = sstable.iterator(dk, Slices.ALL, ColumnFilter.all(cfs.metadata), false, false);
+                UnfilteredRowIterator rowIter = sstable.iterator(dk, Slices.ALL, ColumnFilter.all(cfs.metadata), false);
                 while (rowIter.hasNext())
                 {
                     rowIter.next();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/schema/SchemaKeyspaceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/schema/SchemaKeyspaceTest.java b/test/unit/org/apache/cassandra/schema/SchemaKeyspaceTest.java
index 2f83498..2fd7b06 100644
--- a/test/unit/org/apache/cassandra/schema/SchemaKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/schema/SchemaKeyspaceTest.java
@@ -46,10 +46,6 @@ import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.db.partitions.PartitionUpdate;
 import org.apache.cassandra.db.rows.UnfilteredRowIterators;
 import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.thrift.CfDef;
-import org.apache.cassandra.thrift.ColumnDef;
-import org.apache.cassandra.thrift.IndexType;
-import org.apache.cassandra.thrift.ThriftConversion;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 
@@ -61,19 +57,6 @@ public class SchemaKeyspaceTest
     private static final String KEYSPACE1 = "CFMetaDataTest1";
     private static final String CF_STANDARD1 = "Standard1";
 
-    private static final List<ColumnDef> columnDefs = new ArrayList<>();
-
-    static
-    {
-        columnDefs.add(new ColumnDef(ByteBufferUtil.bytes("col1"), AsciiType.class.getCanonicalName())
-                                    .setIndex_name("col1Index")
-                                    .setIndex_type(IndexType.KEYS));
-
-        columnDefs.add(new ColumnDef(ByteBufferUtil.bytes("col2"), UTF8Type.class.getCanonicalName())
-                                    .setIndex_name("col2Index")
-                                    .setIndex_type(IndexType.KEYS));
-    }
-
     @BeforeClass
     public static void defineSchema() throws ConfigurationException
     {
@@ -84,43 +67,6 @@ public class SchemaKeyspaceTest
     }
 
     @Test
-    public void testThriftConversion() throws Exception
-    {
-        CfDef cfDef = new CfDef().setDefault_validation_class(AsciiType.class.getCanonicalName())
-                                 .setComment("Test comment")
-                                 .setColumn_metadata(columnDefs)
-                                 .setKeyspace(KEYSPACE1)
-                                 .setName(CF_STANDARD1);
-
-        // convert Thrift to CFMetaData
-        CFMetaData cfMetaData = ThriftConversion.fromThrift(cfDef);
-
-        CfDef thriftCfDef = new CfDef();
-        thriftCfDef.keyspace = KEYSPACE1;
-        thriftCfDef.name = CF_STANDARD1;
-        thriftCfDef.default_validation_class = cfDef.default_validation_class;
-        thriftCfDef.comment = cfDef.comment;
-        thriftCfDef.column_metadata = new ArrayList<>();
-        for (ColumnDef columnDef : columnDefs)
-        {
-            ColumnDef c = new ColumnDef();
-            c.name = ByteBufferUtil.clone(columnDef.name);
-            c.validation_class = columnDef.getValidation_class();
-            c.index_name = columnDef.getIndex_name();
-            c.index_type = IndexType.KEYS;
-            thriftCfDef.column_metadata.add(c);
-        }
-
-        CfDef converted = ThriftConversion.toThrift(cfMetaData);
-
-        assertEquals(thriftCfDef.keyspace, converted.keyspace);
-        assertEquals(thriftCfDef.name, converted.name);
-        assertEquals(thriftCfDef.default_validation_class, converted.default_validation_class);
-        assertEquals(thriftCfDef.comment, converted.comment);
-        assertEquals(new HashSet<>(thriftCfDef.column_metadata), new HashSet<>(converted.column_metadata));
-    }
-
-    @Test
     public void testConversionsInverses() throws Exception
     {
         for (String keyspaceName : Schema.instance.getNonSystemKeyspaces())
@@ -128,9 +74,6 @@ public class SchemaKeyspaceTest
             for (ColumnFamilyStore cfs : Keyspace.open(keyspaceName).getColumnFamilyStores())
             {
                 CFMetaData cfm = cfs.metadata;
-                if (!cfm.isThriftCompatible())
-                    continue;
-
                 checkInverses(cfm);
 
                 // Testing with compression to catch #3558
@@ -182,11 +125,6 @@ public class SchemaKeyspaceTest
     {
         KeyspaceMetadata keyspace = Schema.instance.getKSMetaData(cfm.ksName);
 
-        // Test thrift conversion
-        CFMetaData before = cfm;
-        CFMetaData after = ThriftConversion.fromThriftForUpdate(ThriftConversion.toThrift(before), before);
-        assert before.equals(after) : String.format("%n%s%n!=%n%s", before, after);
-
         // Test schema conversion
         Mutation rm = SchemaKeyspace.makeCreateTableMutation(keyspace, cfm, FBUtilities.timestampMicros()).build();
         PartitionUpdate serializedCf = rm.getPartitionUpdate(Schema.instance.getId(SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.TABLES));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/service/DataResolverTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/service/DataResolverTest.java b/test/unit/org/apache/cassandra/service/DataResolverTest.java
index b7624ca..3dbc166 100644
--- a/test/unit/org/apache/cassandra/service/DataResolverTest.java
+++ b/test/unit/org/apache/cassandra/service/DataResolverTest.java
@@ -330,7 +330,7 @@ public class DataResolverTest
                                                                                                        .add("c2", "v2")
                                                                                                        .buildUpdate())));
         InetAddress peer2 = peer();
-        resolver.preprocess(readResponseMessage(peer2, EmptyIterators.unfilteredPartition(cfm, false)));
+        resolver.preprocess(readResponseMessage(peer2, EmptyIterators.unfilteredPartition(cfm)));
 
         try(PartitionIterator data = resolver.resolve();
             RowIterator rows = Iterators.getOnlyElement(data))
@@ -352,8 +352,8 @@ public class DataResolverTest
     public void testResolveWithBothEmpty()
     {
         DataResolver resolver = new DataResolver(ks, command, ConsistencyLevel.ALL, 2, System.nanoTime());
-        resolver.preprocess(readResponseMessage(peer(), EmptyIterators.unfilteredPartition(cfm, false)));
-        resolver.preprocess(readResponseMessage(peer(), EmptyIterators.unfilteredPartition(cfm, false)));
+        resolver.preprocess(readResponseMessage(peer(), EmptyIterators.unfilteredPartition(cfm)));
+        resolver.preprocess(readResponseMessage(peer(), EmptyIterators.unfilteredPartition(cfm)));
 
         try(PartitionIterator data = resolver.resolve())
         {
@@ -848,7 +848,7 @@ public class DataResolverTest
 
     private UnfilteredPartitionIterator fullPartitionDelete(CFMetaData cfm, DecoratedKey dk, long timestamp, int nowInSec)
     {
-        return new SingletonUnfilteredPartitionIterator(PartitionUpdate.fullPartitionDelete(cfm, dk, timestamp, nowInSec).unfilteredIterator(), false);
+        return new SingletonUnfilteredPartitionIterator(PartitionUpdate.fullPartitionDelete(cfm, dk, timestamp, nowInSec).unfilteredIterator());
     }
 
     private static class MessageRecorder implements IMessageSink
@@ -868,6 +868,6 @@ public class DataResolverTest
 
     private UnfilteredPartitionIterator iter(PartitionUpdate update)
     {
-        return new SingletonUnfilteredPartitionIterator(update.unfilteredIterator(), false);
+        return new SingletonUnfilteredPartitionIterator(update.unfilteredIterator());
     }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java b/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java
deleted file mode 100644
index b89f01d..0000000
--- a/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-* 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.service;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.charset.CharacterCodingException;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import org.apache.cassandra.SchemaLoader;
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.db.marshal.AsciiType;
-import org.apache.cassandra.schema.KeyspaceParams;
-import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.utils.ByteBufferUtil;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TFramedTransport;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * Example how to use an embedded cassandra service.
- *
- * Tests connect to localhost:9160 when the embedded server is running.
- *
- */
-public class EmbeddedCassandraServiceTest
-{
-
-    private static EmbeddedCassandraService cassandra;
-    private static final String KEYSPACE1 = "EmbeddedCassandraServiceTest";
-    private static final String CF_STANDARD = "Standard1";
-
-    @BeforeClass
-    public static void defineSchema() throws Exception
-    {
-        SchemaLoader.prepareServer();
-        setup();
-        SchemaLoader.createKeyspace(KEYSPACE1,
-                                    KeyspaceParams.simple(1),
-                                    CFMetaData.Builder.create(KEYSPACE1, CF_STANDARD, true, false, false)
-                                                      .addPartitionKey("pk", AsciiType.instance)
-                                                      .addClusteringColumn("ck", AsciiType.instance)
-                                                      .addRegularColumn("val", AsciiType.instance)
-                                                      .build());
-    }
-
-    /**
-     * Set embedded cassandra up and spawn it in a new thread.
-     *
-     * @throws TTransportException
-     * @throws IOException
-     * @throws InterruptedException
-     */
-    public static void setup() throws TTransportException, IOException, InterruptedException
-    {
-        // unique ks / cfs mean no need to clear the schema
-        cassandra = new EmbeddedCassandraService();
-        cassandra.start();
-    }
-
-    @Test
-    public void testEmbeddedCassandraService()
-    throws AuthenticationException, AuthorizationException, InvalidRequestException, UnavailableException, TimedOutException, TException, NotFoundException, CharacterCodingException
-    {
-        Cassandra.Client client = getClient();
-        client.set_keyspace(KEYSPACE1);
-
-        ByteBuffer key_user_id = ByteBufferUtil.bytes("1");
-
-        long timestamp = System.currentTimeMillis();
-        ColumnPath cp = new ColumnPath("Standard1");
-        ColumnParent par = new ColumnParent("Standard1");
-        cp.column = ByteBufferUtil.bytes("name");
-
-        // insert
-        client.insert(key_user_id,
-                      par,
-                      new Column(ByteBufferUtil.bytes("name")).setValue(ByteBufferUtil.bytes("Ran")).setTimestamp(timestamp),
-                      ConsistencyLevel.ONE);
-
-        // read
-        ColumnOrSuperColumn got = client.get(key_user_id, cp, ConsistencyLevel.ONE);
-
-        // assert
-        assertNotNull("Got a null ColumnOrSuperColumn", got);
-        assertEquals("Ran", ByteBufferUtil.string(got.getColumn().value));
-    }
-
-    /**
-     * Gets a connection to the localhost client
-     *
-     * @return
-     * @throws TTransportException
-     */
-    private Cassandra.Client getClient() throws TTransportException
-    {
-        TTransport tr = new TFramedTransport(new TSocket("localhost", DatabaseDescriptor.getRpcPort()));
-        TProtocol proto = new TBinaryProtocol(tr);
-        Cassandra.Client client = new Cassandra.Client(proto);
-        tr.open();
-        return client;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/transport/MessagePayloadTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/transport/MessagePayloadTest.java b/test/unit/org/apache/cassandra/transport/MessagePayloadTest.java
index 2bd1883..cfbfd39 100644
--- a/test/unit/org/apache/cassandra/transport/MessagePayloadTest.java
+++ b/test/unit/org/apache/cassandra/transport/MessagePayloadTest.java
@@ -292,11 +292,6 @@ public class MessagePayloadTest extends CQLTester
             return QueryProcessor.instance.getPrepared(id);
         }
 
-        public ParsedStatement.Prepared getPreparedForThrift(Integer id)
-        {
-            return QueryProcessor.instance.getPreparedForThrift(id);
-        }
-
         public ResultMessage.Prepared prepare(String query,
                                               QueryState state,
                                               Map<String, ByteBuffer> customPayload)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/test/unit/org/apache/cassandra/triggers/TriggersTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/triggers/TriggersTest.java b/test/unit/org/apache/cassandra/triggers/TriggersTest.java
index e5a2dd6..37638c9 100644
--- a/test/unit/org/apache/cassandra/triggers/TriggersTest.java
+++ b/test/unit/org/apache/cassandra/triggers/TriggersTest.java
@@ -37,9 +37,7 @@ import org.apache.cassandra.db.partitions.Partition;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.exceptions.RequestExecutionException;
 import org.apache.cassandra.service.StorageService;
-import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.FBUtilities;
-import org.apache.thrift.protocol.TBinaryProtocol;
 
 import static org.apache.cassandra.utils.ByteBufferUtil.bytes;
 import static org.apache.cassandra.utils.ByteBufferUtil.toInt;
@@ -49,7 +47,6 @@ import static org.junit.Assert.assertTrue;
 public class TriggersTest
 {
     private static boolean triggerCreated = false;
-    private static ThriftServer thriftServer;
 
     private static String ksName = "triggers_test_ks";
     private static String cfName = "test_table";
@@ -65,11 +62,6 @@ public class TriggersTest
     public void setup() throws Exception
     {
         StorageService.instance.initServer(0);
-        if (thriftServer == null || ! thriftServer.isRunning())
-        {
-            thriftServer = new ThriftServer(InetAddress.getLocalHost(), 9170, 50);
-            thriftServer.start();
-        }
 
         String cql = String.format("CREATE KEYSPACE IF NOT EXISTS %s " +
                                    "WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}",
@@ -92,15 +84,6 @@ public class TriggersTest
         }
     }
 
-    @AfterClass
-    public static void teardown()
-    {
-        if (thriftServer != null && thriftServer.isRunning())
-        {
-            thriftServer.stop();
-        }
-    }
-
     @Test
     public void executeTriggerOnCqlInsert() throws Exception
     {
@@ -121,43 +104,6 @@ public class TriggersTest
     }
 
     @Test
-    public void executeTriggerOnThriftInsert() throws Exception
-    {
-        Cassandra.Client client = new Cassandra.Client(
-                                        new TBinaryProtocol(
-                                            new TFramedTransportFactory().openTransport(
-                                                InetAddress.getLocalHost().getHostName(), 9170)));
-        client.set_keyspace(ksName);
-        client.insert(bytes(2),
-                      new ColumnParent(cfName),
-                      getColumnForInsert("v1", 2),
-                      org.apache.cassandra.thrift.ConsistencyLevel.ONE);
-
-        assertUpdateIsAugmented(2);
-    }
-
-    @Test
-    public void executeTriggerOnThriftBatchUpdate() throws Exception
-    {
-        Cassandra.Client client = new Cassandra.Client(
-                                    new TBinaryProtocol(
-                                        new TFramedTransportFactory().openTransport(
-                                            InetAddress.getLocalHost().getHostName(), 9170)));
-        client.set_keyspace(ksName);
-        org.apache.cassandra.thrift.Mutation mutation = new org.apache.cassandra.thrift.Mutation();
-        ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
-        cosc.setColumn(getColumnForInsert("v1", 3));
-        mutation.setColumn_or_supercolumn(cosc);
-        client.batch_mutate(
-            Collections.singletonMap(bytes(3),
-                                     Collections.singletonMap(cfName,
-                                                              Collections.singletonList(mutation))),
-            org.apache.cassandra.thrift.ConsistencyLevel.ONE);
-
-        assertUpdateIsAugmented(3);
-    }
-
-    @Test
     public void executeTriggerOnCqlInsertWithConditions() throws Exception
     {
         String cql = String.format("INSERT INTO %s.%s (k, v1) VALUES (4, 4) IF NOT EXISTS", ksName, cfName);
@@ -177,24 +123,6 @@ public class TriggersTest
         assertUpdateIsAugmented(5);
     }
 
-    @Test
-    public void executeTriggerOnThriftCASOperation() throws Exception
-    {
-        Cassandra.Client client = new Cassandra.Client(
-                new TBinaryProtocol(
-                        new TFramedTransportFactory().openTransport(
-                                InetAddress.getLocalHost().getHostName(), 9170)));
-        client.set_keyspace(ksName);
-        client.cas(bytes(6),
-                   cfName,
-                   Collections.<Column>emptyList(),
-                   Collections.singletonList(getColumnForInsert("v1", 6)),
-                   org.apache.cassandra.thrift.ConsistencyLevel.LOCAL_SERIAL,
-                   org.apache.cassandra.thrift.ConsistencyLevel.ONE);
-
-        assertUpdateIsAugmented(6);
-    }
-
     @Test(expected=org.apache.cassandra.exceptions.InvalidRequestException.class)
     public void onCqlUpdateWithConditionsRejectGeneratedUpdatesForDifferentPartition() throws Exception
     {
@@ -227,56 +155,6 @@ public class TriggersTest
         }
     }
 
-    @Test(expected=InvalidRequestException.class)
-    public void onThriftCASRejectGeneratedUpdatesForDifferentPartition() throws Exception
-    {
-        String cf = "cf" + System.nanoTime();
-        try
-        {
-            setupTableWithTrigger(cf, CrossPartitionTrigger.class);
-            Cassandra.Client client = new Cassandra.Client(
-                    new TBinaryProtocol(
-                            new TFramedTransportFactory().openTransport(
-                                    InetAddress.getLocalHost().getHostName(), 9170)));
-            client.set_keyspace(ksName);
-            client.cas(bytes(9),
-                       cf,
-                       Collections.<Column>emptyList(),
-                       Collections.singletonList(getColumnForInsert("v1", 9)),
-                       org.apache.cassandra.thrift.ConsistencyLevel.LOCAL_SERIAL,
-                       org.apache.cassandra.thrift.ConsistencyLevel.ONE);
-        }
-        finally
-        {
-            assertUpdateNotExecuted(cf, 9);
-        }
-    }
-
-    @Test(expected=InvalidRequestException.class)
-    public void onThriftCASRejectGeneratedUpdatesForDifferentCF() throws Exception
-    {
-        String cf = "cf" + System.nanoTime();
-        try
-        {
-            setupTableWithTrigger(cf, CrossTableTrigger.class);
-            Cassandra.Client client = new Cassandra.Client(
-                    new TBinaryProtocol(
-                            new TFramedTransportFactory().openTransport(
-                                    InetAddress.getLocalHost().getHostName(), 9170)));
-            client.set_keyspace(ksName);
-            client.cas(bytes(10),
-                       cf,
-                       Collections.<Column>emptyList(),
-                       Collections.singletonList(getColumnForInsert("v1", 10)),
-                       org.apache.cassandra.thrift.ConsistencyLevel.LOCAL_SERIAL,
-                       org.apache.cassandra.thrift.ConsistencyLevel.ONE);
-        }
-        finally
-        {
-            assertUpdateNotExecuted(cf, 10);
-        }
-    }
-
     @Test(expected=org.apache.cassandra.exceptions.InvalidRequestException.class)
     public void ifTriggerThrowsErrorNoMutationsAreApplied() throws Exception
     {
@@ -325,15 +203,6 @@ public class TriggersTest
         assertTrue(rs.isEmpty());
     }
 
-    private org.apache.cassandra.thrift.Column getColumnForInsert(String columnName, int value)
-    {
-        org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();
-        column.setName(LegacyLayout.makeLegacyComparator(Schema.instance.getCFMetaData(ksName, cfName)).fromString(columnName));
-        column.setValue(bytes(value));
-        column.setTimestamp(System.currentTimeMillis());
-        return column;
-    }
-
     public static class TestTrigger implements ITrigger
     {
         public Collection<Mutation> augment(Partition partition)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/bin/cassandra.in.bat
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra.in.bat b/tools/bin/cassandra.in.bat
index 0fdd31a..8804921 100644
--- a/tools/bin/cassandra.in.bat
+++ b/tools/bin/cassandra.in.bat
@@ -39,7 +39,7 @@ goto :eof
 :okClasspath
 
 REM Include the build\classes\main directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\main";"%CASSANDRA_HOME%\build\classes\thrift";"%CASSANDRA_HOME%\build\classes\stress"
+set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\main";"%CASSANDRA_HOME%\build\classes\stress"
 
 REM Add the default storage location.  Can be overridden in conf\cassandra.yaml
 set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% "-Dcassandra.storagedir=%CASSANDRA_HOME%\data"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/bin/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra.in.sh b/tools/bin/cassandra.in.sh
index 004f394..2f0d1ec 100644
--- a/tools/bin/cassandra.in.sh
+++ b/tools/bin/cassandra.in.sh
@@ -28,7 +28,6 @@ fi
 # it's just used here in constructing the classpath.
 cassandra_bin="$CASSANDRA_HOME/build/classes/main"
 cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/stress"
-cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
 #cassandra_bin="$cassandra_home/build/cassandra.jar"
 
 # the default location for commitlogs, sstables, and saved caches

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/README.txt
----------------------------------------------------------------------
diff --git a/tools/stress/README.txt b/tools/stress/README.txt
index aa89dab..585409e 100644
--- a/tools/stress/README.txt
+++ b/tools/stress/README.txt
@@ -55,7 +55,7 @@ Primary Options:
     -rate:
         Thread count, rate limit or automatic mode (default is auto)
     -mode:
-        Thrift or CQL with options
+        CQL transport options
     -errors:
         How to handle errors when encountered during stress
     -sample:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/Operation.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/Operation.java b/tools/stress/src/org/apache/cassandra/stress/Operation.java
index dc5bd2f..89664f0 100644
--- a/tools/stress/src/org/apache/cassandra/stress/Operation.java
+++ b/tools/stress/src/org/apache/cassandra/stress/Operation.java
@@ -24,8 +24,6 @@ import org.apache.cassandra.stress.report.Timer;
 import org.apache.cassandra.stress.settings.SettingsLog;
 import org.apache.cassandra.stress.settings.StressSettings;
 import org.apache.cassandra.stress.util.JavaDriverClient;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.InvalidRequestException;
 import org.apache.cassandra.transport.SimpleClient;
 
 public abstract class Operation
@@ -53,13 +51,6 @@ public abstract class Operation
         return false;
     }
 
-    /**
-     * Run operation
-     * @param client Cassandra Thrift client connection
-     * @throws IOException on any I/O error.
-     */
-    public abstract void run(ThriftClient client) throws IOException;
-
     public void run(SimpleClient client) throws IOException
     {
         throw new UnsupportedOperationException();
@@ -126,7 +117,7 @@ public abstract class Operation
     protected String getExceptionMessage(Exception e)
     {
         String className = e.getClass().getSimpleName();
-        String message = (e instanceof InvalidRequestException) ? ((InvalidRequestException) e).getWhy() : e.getMessage();
+        String message = e.getMessage();
         return (message == null) ? "(" + className + ")" : String.format("(%s): %s", className, message);
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/StressAction.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
index 30f8899..a90f9ff 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -33,7 +33,6 @@ import org.apache.cassandra.stress.settings.SettingsCommand;
 import org.apache.cassandra.stress.settings.StressSettings;
 import org.apache.cassandra.stress.util.JavaDriverClient;
 import org.apache.cassandra.stress.util.ResultLogger;
-import org.apache.cassandra.stress.util.ThriftClient;
 import org.apache.cassandra.transport.SimpleClient;
 import org.jctools.queues.SpscArrayQueue;
 import org.jctools.queues.SpscUnboundedArrayQueue;
@@ -418,7 +417,6 @@ public class StressAction implements Runnable
             try
             {
                 SimpleClient sclient = null;
-                ThriftClient tclient = null;
                 JavaDriverClient jclient = null;
 
 
@@ -431,10 +429,6 @@ public class StressAction implements Runnable
                     case SIMPLE_NATIVE:
                         sclient = settings.getSimpleNativeClient();
                         break;
-                    case THRIFT:
-                    case THRIFT_SMART:
-                        tclient = settings.getThriftClient();
-                        break;
                     default:
                         throw new IllegalStateException();
                 }
@@ -461,10 +455,8 @@ public class StressAction implements Runnable
                             case SIMPLE_NATIVE:
                                 op.run(sclient);
                                 break;
-                            case THRIFT:
-                            case THRIFT_SMART:
                             default:
-                                op.run(tclient);
+                                throw new IllegalStateException();
                         }
                     }
                     catch (Exception e)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
index 9c0be4e..95df986 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressProfile.java
@@ -55,10 +55,6 @@ import org.apache.cassandra.stress.report.Timer;
 import org.apache.cassandra.stress.settings.*;
 import org.apache.cassandra.stress.util.JavaDriverClient;
 import org.apache.cassandra.stress.util.ResultLogger;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.Compression;
-import org.apache.cassandra.thrift.ThriftConversion;
-import org.apache.thrift.TException;
 import org.yaml.snakeyaml.Yaml;
 import org.yaml.snakeyaml.constructor.Constructor;
 import org.yaml.snakeyaml.error.YAMLException;
@@ -88,12 +84,10 @@ public class StressProfile implements Serializable
     transient volatile RatioDistributionFactory selectchance;
     transient volatile RatioDistributionFactory rowPopulation;
     transient volatile PreparedStatement insertStatement;
-    transient volatile Integer thriftInsertId;
     transient volatile List<ValidatingSchemaQuery.Factory> validationFactories;
 
     transient volatile Map<String, SchemaQuery.ArgSelect> argSelects;
     transient volatile Map<String, PreparedStatement> queryStatements;
-    transient volatile Map<String, Integer> thriftQueryIds;
 
     private static final Pattern lowercaseAlphanumeric = Pattern.compile("[a-z0-9_]+");
 
@@ -367,42 +361,25 @@ public class StressProfile implements Serializable
             {
                 if (queryStatements == null)
                 {
-                    try
-                    {
-                        JavaDriverClient jclient = settings.getJavaDriverClient();
-                        ThriftClient tclient = null;
-
-                        if (settings.mode.api != ConnectionAPI.JAVA_DRIVER_NATIVE)
-                            tclient = settings.getThriftClient();
-
-                        Map<String, PreparedStatement> stmts = new HashMap<>();
-                        Map<String, Integer> tids = new HashMap<>();
-                        Map<String, SchemaQuery.ArgSelect> args = new HashMap<>();
-                        for (Map.Entry<String, StressYaml.QueryDef> e : queries.entrySet())
-                        {
-                            stmts.put(e.getKey().toLowerCase(), jclient.prepare(e.getValue().cql));
-
-                            if (tclient != null)
-                                tids.put(e.getKey().toLowerCase(), tclient.prepare_cql3_query(e.getValue().cql, Compression.NONE));
+                    JavaDriverClient jclient = settings.getJavaDriverClient();
 
-                            args.put(e.getKey().toLowerCase(), e.getValue().fields == null
-                                                                     ? SchemaQuery.ArgSelect.MULTIROW
-                                                                     : SchemaQuery.ArgSelect.valueOf(e.getValue().fields.toUpperCase()));
-                        }
-                        thriftQueryIds = tids;
-                        queryStatements = stmts;
-                        argSelects = args;
-                    }
-                    catch (TException e)
+                    Map<String, PreparedStatement> stmts = new HashMap<>();
+                    Map<String, Integer> tids = new HashMap<>();
+                    Map<String, SchemaQuery.ArgSelect> args = new HashMap<>();
+                    for (Map.Entry<String, StressYaml.QueryDef> e : queries.entrySet())
                     {
-                        throw new RuntimeException(e);
+                        stmts.put(e.getKey().toLowerCase(), jclient.prepare(e.getValue().cql));
+                        args.put(e.getKey().toLowerCase(), e.getValue().fields == null
+                                                                 ? SchemaQuery.ArgSelect.MULTIROW
+                                                                 : SchemaQuery.ArgSelect.valueOf(e.getValue().fields.toUpperCase()));
                     }
+                    queryStatements = stmts;
+                    argSelects = args;
                 }
             }
         }
 
-        return new SchemaQuery(timer, settings, generator, seeds, thriftQueryIds.get(name), queryStatements.get(name),
-                               ThriftConversion.fromThrift(settings.command.consistencyLevel), argSelects.get(name));
+        return new SchemaQuery(timer, settings, generator, seeds, queryStatements.get(name), settings.command.consistencyLevel, argSelects.get(name));
     }
 
     public Operation getBulkReadQueries(String name, Timer timer, StressSettings settings, TokenRangeIterator tokenRangeIterator, boolean isWarmup)
@@ -492,7 +469,7 @@ public class StressProfile implements Serializable
         String tableCreate = tableCql.replaceFirst("\\s+\"?"+tableName+"\"?\\s+", " \""+keyspaceName+"\".\""+tableName+"\" ");
 
 
-        return new SchemaInsert(timer, settings, generator, seedManager, selectchance.get(), rowPopulation.get(), thriftInsertId, statement, tableCreate);
+        return new SchemaInsert(timer, settings, generator, seedManager, selectchance.get(), rowPopulation.get(), statement, tableCreate);
     }
 
     public SchemaInsert getInsert(Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
@@ -615,24 +592,12 @@ public class StressProfile implements Serializable
                     JavaDriverClient client = settings.getJavaDriverClient();
                     String query = sb.toString();
 
-                    if (settings.mode.api != ConnectionAPI.JAVA_DRIVER_NATIVE)
-                    {
-                        try
-                        {
-                            thriftInsertId = settings.getThriftClient().prepare_cql3_query(query, Compression.NONE);
-                        }
-                        catch (TException e)
-                        {
-                            throw new RuntimeException(e);
-                        }
-                    }
-
                     insertStatement = client.prepare(query);
                 }
             }
         }
 
-        return new SchemaInsert(timer, settings, generator, seedManager, partitions.get(), selectchance.get(), rowPopulation.get(), thriftInsertId, insertStatement, ThriftConversion.fromThrift(settings.command.consistencyLevel), batchType);
+        return new SchemaInsert(timer, settings, generator, seedManager, partitions.get(), selectchance.get(), rowPopulation.get(), insertStatement, settings.command.consistencyLevel, batchType);
     }
 
     public List<ValidatingSchemaQuery> getValidate(Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
@@ -651,7 +616,7 @@ public class StressProfile implements Serializable
 
         List<ValidatingSchemaQuery> queries = new ArrayList<>();
         for (ValidatingSchemaQuery.Factory factory : validationFactories)
-            queries.add(factory.create(timer, settings, generator, seedManager, ThriftConversion.fromThrift(settings.command.consistencyLevel)));
+            queries.add(factory.create(timer, settings, generator, seedManager, settings.command.consistencyLevel));
         return queries;
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/generate/PartitionIterator.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/generate/PartitionIterator.java b/tools/stress/src/org/apache/cassandra/stress/generate/PartitionIterator.java
index 2157214..f485ab7 100644
--- a/tools/stress/src/org/apache/cassandra/stress/generate/PartitionIterator.java
+++ b/tools/stress/src/org/apache/cassandra/stress/generate/PartitionIterator.java
@@ -770,10 +770,4 @@ public abstract class PartitionIterator implements Iterator<Row>
         }
         return sb.toString();
     }
-
-    // used for thrift smart routing - if it's a multi-part key we don't try to route correctly right now
-    public ByteBuffer getToken()
-    {
-        return generator.partitionKey.get(0).type.decompose(partitionKey[0]);
-    }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/CqlOperation.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/CqlOperation.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/CqlOperation.java
index 647ba87..7fcc63d 100644
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/CqlOperation.java
+++ b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/CqlOperation.java
@@ -36,15 +36,9 @@ import org.apache.cassandra.stress.settings.Command;
 import org.apache.cassandra.stress.settings.ConnectionStyle;
 import org.apache.cassandra.stress.settings.StressSettings;
 import org.apache.cassandra.stress.util.JavaDriverClient;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.Compression;
-import org.apache.cassandra.thrift.CqlResult;
-import org.apache.cassandra.thrift.CqlRow;
-import org.apache.cassandra.thrift.ThriftConversion;
 import org.apache.cassandra.transport.SimpleClient;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.utils.ByteBufferUtil;
-import org.apache.thrift.TException;
 
 public abstract class CqlOperation<V> extends PredefinedOperation
 {
@@ -72,17 +66,13 @@ public abstract class CqlOperation<V> extends PredefinedOperation
             Object idobj = getCqlCache();
             if (idobj == null)
             {
-                try
-                {
-                    id = client.createPreparedStatement(buildQuery());
-                } catch (TException e)
-                {
-                    throw new RuntimeException(e);
-                }
+                id = client.createPreparedStatement(buildQuery());
                 storeCqlCache(id);
             }
             else
+            {
                 id = idobj;
+            }
 
             op = buildRunOp(client, null, id, queryParams, key);
         }
@@ -244,12 +234,6 @@ public abstract class CqlOperation<V> extends PredefinedOperation
 
 
     @Override
-    public void run(final ThriftClient client) throws IOException
-    {
-        run(wrap(client));
-    }
-
-    @Override
     public void run(SimpleClient client) throws IOException
     {
         run(wrap(client));
@@ -261,11 +245,6 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         run(wrap(client));
     }
 
-    public ClientWrapper wrap(ThriftClient client)
-    {
-        return new Cql3CassandraClientWrapper(client);
-    }
-
     public ClientWrapper wrap(JavaDriverClient client)
     {
         return new JavaDriverWrapper(client);
@@ -278,9 +257,9 @@ public abstract class CqlOperation<V> extends PredefinedOperation
 
     protected interface ClientWrapper
     {
-        Object createPreparedStatement(String cqlQuery) throws TException;
-        <V> V execute(Object preparedStatementId, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler) throws TException;
-        <V> V execute(String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler) throws TException;
+        Object createPreparedStatement(String cqlQuery);
+        <V> V execute(Object preparedStatementId, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler);
+        <V> V execute(String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler);
     }
 
     private final class JavaDriverWrapper implements ClientWrapper
@@ -295,7 +274,7 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         public <V> V execute(String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler)
         {
             String formattedQuery = formatCqlQuery(query, queryParams);
-            return handler.javaDriverHandler().apply(client.execute(formattedQuery, ThriftConversion.fromThrift(settings.command.consistencyLevel)));
+            return handler.javaDriverHandler().apply(client.execute(formattedQuery, settings.command.consistencyLevel));
         }
 
         @Override
@@ -305,7 +284,7 @@ public abstract class CqlOperation<V> extends PredefinedOperation
                     client.executePrepared(
                             (PreparedStatement) preparedStatementId,
                             queryParams,
-                            ThriftConversion.fromThrift(settings.command.consistencyLevel)));
+                            settings.command.consistencyLevel));
         }
 
         @Override
@@ -327,17 +306,17 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         public <V> V execute(String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler)
         {
             String formattedQuery = formatCqlQuery(query, queryParams);
-            return handler.thriftHandler().apply(client.execute(formattedQuery, ThriftConversion.fromThrift(settings.command.consistencyLevel)));
+            return handler.simpleClientHandler().apply(client.execute(formattedQuery, settings.command.consistencyLevel));
         }
 
         @Override
         public <V> V execute(Object preparedStatementId, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler)
         {
-            return handler.thriftHandler().apply(
+            return handler.simpleClientHandler().apply(
                     client.executePrepared(
                             (byte[]) preparedStatementId,
                             toByteBufferParams(queryParams),
-                            ThriftConversion.fromThrift(settings.command.consistencyLevel)));
+                            settings.command.consistencyLevel));
         }
 
         @Override
@@ -347,46 +326,12 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         }
     }
 
-    // client wrapper for Cql3
-    private final class Cql3CassandraClientWrapper implements ClientWrapper
-    {
-        final ThriftClient client;
-        private Cql3CassandraClientWrapper(ThriftClient client)
-        {
-            this.client = client;
-        }
-
-        @Override
-        public <V> V execute(String query, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler) throws TException
-        {
-            String formattedQuery = formatCqlQuery(query, queryParams);
-            return handler.simpleNativeHandler().apply(
-                    client.execute_cql3_query(formattedQuery, key, Compression.NONE, settings.command.consistencyLevel)
-            );
-        }
-
-        @Override
-        public <V> V execute(Object preparedStatementId, ByteBuffer key, List<Object> queryParams, ResultHandler<V> handler) throws TException
-        {
-            Integer id = (Integer) preparedStatementId;
-            return handler.simpleNativeHandler().apply(
-                    client.execute_prepared_cql3_query(id, key, toByteBufferParams(queryParams), settings.command.consistencyLevel)
-            );
-        }
-
-        @Override
-        public Object createPreparedStatement(String cqlQuery) throws TException
-        {
-            return client.prepare_cql3_query(cqlQuery, Compression.NONE);
-        }
-    }
 
     // interface for building functions to standardise results from each client
     protected static interface ResultHandler<V>
     {
         Function<ResultSet, V> javaDriverHandler();
-        Function<ResultMessage, V> thriftHandler();
-        Function<CqlResult, V> simpleNativeHandler();
+        Function<ResultMessage, V> simpleClientHandler();
     }
 
     protected static class RowCountHandler implements ResultHandler<Integer>
@@ -409,7 +354,7 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         }
 
         @Override
-        public Function<ResultMessage, Integer> thriftHandler()
+        public Function<ResultMessage, Integer> simpleClientHandler()
         {
             return new Function<ResultMessage, Integer>()
             {
@@ -420,27 +365,6 @@ public abstract class CqlOperation<V> extends PredefinedOperation
                 }
             };
         }
-
-        @Override
-        public Function<CqlResult, Integer> simpleNativeHandler()
-        {
-            return new Function<CqlResult, Integer>()
-            {
-
-                @Override
-                public Integer apply(CqlResult result)
-                {
-                    switch (result.getType())
-                    {
-                        case ROWS:
-                            return result.getRows().size();
-                        default:
-                            return 1;
-                    }
-                }
-            };
-        }
-
     }
 
     // Processes results from each client into an array of all key bytes returned
@@ -475,7 +399,7 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         }
 
         @Override
-        public Function<ResultMessage, ByteBuffer[][]> thriftHandler()
+        public Function<ResultMessage, ByteBuffer[][]> simpleClientHandler()
         {
             return new Function<ResultMessage, ByteBuffer[][]>()
             {
@@ -499,29 +423,6 @@ public abstract class CqlOperation<V> extends PredefinedOperation
                 }
             };
         }
-
-        @Override
-        public Function<CqlResult, ByteBuffer[][]> simpleNativeHandler()
-        {
-            return new Function<CqlResult, ByteBuffer[][]>()
-            {
-
-                @Override
-                public ByteBuffer[][] apply(CqlResult result)
-                {
-                    ByteBuffer[][] r = new ByteBuffer[result.getRows().size()][];
-                    for (int i = 0 ; i < r.length ; i++)
-                    {
-                        CqlRow row = result.getRows().get(i);
-                        r[i] = new ByteBuffer[row.getColumns().size()];
-                        for (int j = 0 ; j < r[i].length ; j++)
-                            r[i][j] = ByteBuffer.wrap(row.getColumns().get(j).getValue());
-                    }
-                    return r;
-                }
-            };
-        }
-
     }
     // Processes results from each client into an array of all key bytes returned
     protected static final class KeysHandler implements ResultHandler<byte[][]>
@@ -550,7 +451,7 @@ public abstract class CqlOperation<V> extends PredefinedOperation
         }
 
         @Override
-        public Function<ResultMessage, byte[][]> thriftHandler()
+        public Function<ResultMessage, byte[][]> simpleClientHandler()
         {
             return new Function<ResultMessage, byte[][]>()
             {
@@ -570,24 +471,6 @@ public abstract class CqlOperation<V> extends PredefinedOperation
                 }
             };
         }
-
-        @Override
-        public Function<CqlResult, byte[][]> simpleNativeHandler()
-        {
-            return new Function<CqlResult, byte[][]>()
-            {
-
-                @Override
-                public byte[][] apply(CqlResult result)
-                {
-                    byte[][] r = new byte[result.getRows().size()][];
-                    for (int i = 0 ; i < r.length ; i++)
-                        r[i] = result.getRows().get(i).getKey();
-                    return r;
-                }
-            };
-        }
-
     }
 
     private static String getUnQuotedCqlBlob(ByteBuffer term)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/PredefinedOperation.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/PredefinedOperation.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/PredefinedOperation.java
index db35504..9062cb6 100644
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/PredefinedOperation.java
+++ b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/PredefinedOperation.java
@@ -30,8 +30,6 @@ import org.apache.cassandra.stress.report.Timer;
 import org.apache.cassandra.stress.settings.Command;
 import org.apache.cassandra.stress.settings.CqlVersion;
 import org.apache.cassandra.stress.settings.StressSettings;
-import org.apache.cassandra.thrift.SlicePredicate;
-import org.apache.cassandra.thrift.SliceRange;
 
 public abstract class PredefinedOperation extends PartitionOperation
 {
@@ -100,24 +98,6 @@ public abstract class PredefinedOperation extends PartitionOperation
         {
             return indices != null ? indices.length : ub - lb;
         }
-
-        SlicePredicate predicate()
-        {
-            final SlicePredicate predicate = new SlicePredicate();
-            if (indices == null)
-            {
-                predicate.setSlice_range(new SliceRange()
-                                         .setStart(settings.columns.names.get(lb))
-                                         .setFinish(EMPTY_BYTE_ARRAY)
-                                         .setReversed(false)
-                                         .setCount(count())
-                );
-            }
-            else
-                predicate.setColumn_names(select(settings.columns.names));
-            return predicate;
-
-        }
     }
 
     public String toString()
@@ -185,57 +165,14 @@ public abstract class PredefinedOperation extends PartitionOperation
         switch (type)
         {
             case READ:
-                switch(settings.mode.style)
-                {
-                    case THRIFT:
-                        return new ThriftReader(timer, generator, seedManager, settings);
-                    case CQL:
-                    case CQL_PREPARED:
-                        return new CqlReader(timer, generator, seedManager, settings);
-                    default:
-                        throw new UnsupportedOperationException();
-                }
-
-
+                return new CqlReader(timer, generator, seedManager, settings);
             case COUNTER_READ:
-                switch(settings.mode.style)
-                {
-                    case THRIFT:
-                        return new ThriftCounterGetter(timer, generator, seedManager, settings);
-                    case CQL:
-                    case CQL_PREPARED:
-                        return new CqlCounterGetter(timer, generator, seedManager, settings);
-                    default:
-                        throw new UnsupportedOperationException();
-                }
-
+                return new CqlCounterGetter(timer, generator, seedManager, settings);
             case WRITE:
-
-                switch(settings.mode.style)
-                {
-                    case THRIFT:
-                        return new ThriftInserter(timer, generator, seedManager, settings);
-                    case CQL:
-                    case CQL_PREPARED:
-                        return new CqlInserter(timer, generator, seedManager, settings);
-                    default:
-                        throw new UnsupportedOperationException();
-                }
-
+                return new CqlInserter(timer, generator, seedManager, settings);
             case COUNTER_WRITE:
-                switch(settings.mode.style)
-                {
-                    case THRIFT:
-                        return new ThriftCounterAdder(counteradd, timer, generator, seedManager, settings);
-                    case CQL:
-                    case CQL_PREPARED:
-                        return new CqlCounterAdder(counteradd, timer, generator, seedManager, settings);
-                    default:
-                        throw new UnsupportedOperationException();
-                }
-
+                return new CqlCounterAdder(counteradd, timer, generator, seedManager, settings);
         }
-
         throw new UnsupportedOperationException();
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterAdder.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterAdder.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterAdder.java
deleted file mode 100644
index 42f8bc9..0000000
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterAdder.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.stress.operations.predefined;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cassandra.stress.generate.Distribution;
-import org.apache.cassandra.stress.generate.DistributionFactory;
-import org.apache.cassandra.stress.generate.PartitionGenerator;
-import org.apache.cassandra.stress.generate.SeedManager;
-import org.apache.cassandra.stress.report.Timer;
-import org.apache.cassandra.stress.settings.Command;
-import org.apache.cassandra.stress.settings.StressSettings;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.ColumnOrSuperColumn;
-import org.apache.cassandra.thrift.CounterColumn;
-import org.apache.cassandra.thrift.Mutation;
-
-public class ThriftCounterAdder extends PredefinedOperation
-{
-
-    final Distribution counteradd;
-    public ThriftCounterAdder(DistributionFactory counteradd, Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
-    {
-        super(Command.COUNTER_WRITE, timer, generator, seedManager, settings);
-        this.counteradd = counteradd.get();
-    }
-
-    public boolean isWrite()
-    {
-        return true;
-    }
-
-    public void run(final ThriftClient client) throws IOException
-    {
-        List<CounterColumn> columns = new ArrayList<>();
-        for (ByteBuffer name : select().select(settings.columns.names))
-            columns.add(new CounterColumn(name, counteradd.next()));
-
-        List<Mutation> mutations = new ArrayList<>(columns.size());
-        for (CounterColumn c : columns)
-        {
-            ColumnOrSuperColumn cosc = new ColumnOrSuperColumn().setCounter_column(c);
-            mutations.add(new Mutation().setColumn_or_supercolumn(cosc));
-        }
-        Map<String, List<Mutation>> row = Collections.singletonMap(type.table, mutations);
-
-        final ByteBuffer key = getKey();
-        final Map<ByteBuffer, Map<String, List<Mutation>>> record = Collections.singletonMap(key, row);
-
-        timeWithRetry(new RunOp()
-        {
-            @Override
-            public boolean run() throws Exception
-            {
-                client.batch_mutate(record, settings.command.consistencyLevel);
-                return true;
-            }
-
-            @Override
-            public int partitionCount()
-            {
-                return 1;
-            }
-
-            @Override
-            public int rowCount()
-            {
-                return 1;
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterGetter.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterGetter.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterGetter.java
deleted file mode 100644
index 4bec3b2..0000000
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftCounterGetter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.stress.operations.predefined;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.List;
-
-import org.apache.cassandra.stress.generate.PartitionGenerator;
-import org.apache.cassandra.stress.generate.SeedManager;
-import org.apache.cassandra.stress.report.Timer;
-import org.apache.cassandra.stress.settings.Command;
-import org.apache.cassandra.stress.settings.StressSettings;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.ColumnParent;
-import org.apache.cassandra.thrift.SlicePredicate;
-
-public class ThriftCounterGetter extends PredefinedOperation
-{
-    public ThriftCounterGetter(Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
-    {
-        super(Command.COUNTER_READ, timer, generator, seedManager, settings);
-    }
-
-    public void run(final ThriftClient client) throws IOException
-    {
-        final SlicePredicate predicate = select().predicate();
-        final ByteBuffer key = getKey();
-        timeWithRetry(new RunOp()
-        {
-            @Override
-            public boolean run() throws Exception
-            {
-                List<?> r = client.get_slice(key, new ColumnParent(type.table), predicate, settings.command.consistencyLevel);
-                return r != null && r.size() > 0;
-            }
-
-            @Override
-            public int partitionCount()
-            {
-                return 1;
-            }
-
-            @Override
-            public int rowCount()
-            {
-                return 1;
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftInserter.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftInserter.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftInserter.java
deleted file mode 100644
index ecaa140..0000000
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftInserter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.stress.operations.predefined;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cassandra.stress.generate.PartitionGenerator;
-import org.apache.cassandra.stress.generate.SeedManager;
-import org.apache.cassandra.stress.report.Timer;
-import org.apache.cassandra.stress.settings.Command;
-import org.apache.cassandra.stress.settings.StressSettings;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.Column;
-import org.apache.cassandra.thrift.ColumnOrSuperColumn;
-import org.apache.cassandra.thrift.Mutation;
-import org.apache.cassandra.utils.FBUtilities;
-
-public final class ThriftInserter extends PredefinedOperation
-{
-
-    public ThriftInserter(Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
-    {
-        super(Command.WRITE, timer, generator, seedManager, settings);
-    }
-
-    public boolean isWrite()
-    {
-        return true;
-    }
-
-    public void run(final ThriftClient client) throws IOException
-    {
-        final ByteBuffer key = getKey();
-        final List<Column> columns = getColumns();
-
-        List<Mutation> mutations = new ArrayList<>(columns.size());
-        for (Column c : columns)
-        {
-            ColumnOrSuperColumn column = new ColumnOrSuperColumn().setColumn(c);
-            mutations.add(new Mutation().setColumn_or_supercolumn(column));
-        }
-        Map<String, List<Mutation>> row = Collections.singletonMap(type.table, mutations);
-
-        final Map<ByteBuffer, Map<String, List<Mutation>>> record = Collections.singletonMap(key, row);
-
-        timeWithRetry(new RunOp()
-        {
-            @Override
-            public boolean run() throws Exception
-            {
-                client.batch_mutate(record, settings.command.consistencyLevel);
-                return true;
-            }
-
-            @Override
-            public int partitionCount()
-            {
-                return 1;
-            }
-
-            @Override
-            public int rowCount()
-            {
-                return 1;
-            }
-        });
-    }
-
-    protected List<Column> getColumns()
-    {
-        final ColumnSelection selection = select();
-        final List<ByteBuffer> values = getColumnValues(selection);
-        final List<Column> columns = new ArrayList<>(values.size());
-        final List<ByteBuffer> names = select().select(settings.columns.names);
-        for (int i = 0 ; i < values.size() ; i++)
-            columns.add(new Column(names.get(i))
-                        .setValue(values.get(i))
-                        .setTimestamp(settings.columns.timestamp != null
-                                      ? Long.parseLong(settings.columns.timestamp)
-                                      : FBUtilities.timestampMicros()));
-        return columns;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftReader.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftReader.java b/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftReader.java
deleted file mode 100644
index 4d530b9..0000000
--- a/tools/stress/src/org/apache/cassandra/stress/operations/predefined/ThriftReader.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.stress.operations.predefined;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.List;
-
-import org.apache.cassandra.stress.generate.PartitionGenerator;
-import org.apache.cassandra.stress.generate.SeedManager;
-import org.apache.cassandra.stress.report.Timer;
-import org.apache.cassandra.stress.settings.Command;
-import org.apache.cassandra.stress.settings.StressSettings;
-import org.apache.cassandra.stress.util.ThriftClient;
-import org.apache.cassandra.thrift.ColumnOrSuperColumn;
-import org.apache.cassandra.thrift.ColumnParent;
-
-public final class ThriftReader extends PredefinedOperation
-{
-
-    public ThriftReader(Timer timer, PartitionGenerator generator, SeedManager seedManager, StressSettings settings)
-    {
-        super(Command.READ, timer, generator, seedManager, settings);
-    }
-
-    public void run(final ThriftClient client) throws IOException
-    {
-        final ColumnSelection select = select();
-        final ByteBuffer key = getKey();
-        final List<ByteBuffer> expect = getColumnValues(select);
-        timeWithRetry(new RunOp()
-        {
-            @Override
-            public boolean run() throws Exception
-            {
-                List<ColumnOrSuperColumn> row = client.get_slice(key, new ColumnParent(type.table), select.predicate(), settings.command.consistencyLevel);
-                if (expect == null)
-                    return !row.isEmpty();
-                if (row == null)
-                    return false;
-                if (row.size() != expect.size())
-                    return false;
-                for (int i = 0 ; i < row.size() ; i++)
-                    if (!row.get(i).getColumn().bufferForValue().equals(expect.get(i)))
-                        return false;
-                return true;
-            }
-
-            @Override
-            public int partitionCount()
-            {
-                return 1;
-            }
-
-            @Override
-            public int rowCount()
-            {
-                return 1;
-            }
-        });
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4881d9c3/tools/stress/src/org/apache/cassandra/stress/operations/userdefined/SchemaInsert.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/operations/userdefined/SchemaInsert.java b/tools/stress/src/org/apache/cassandra/stress/operations/userdefined/SchemaInsert.java
index 2c717a1..4e82492 100644
--- a/tools/stress/src/org/apache/cassandra/stress/operations/userdefined/SchemaInsert.java
+++ b/tools/stress/src/org/apache/cassandra/stress/operations/userdefined/SchemaInsert.java
@@ -38,7 +38,6 @@ import org.apache.cassandra.stress.generate.*;
 import org.apache.cassandra.stress.report.Timer;
 import org.apache.cassandra.stress.settings.StressSettings;
 import org.apache.cassandra.stress.util.JavaDriverClient;
-import org.apache.cassandra.stress.util.ThriftClient;
 
 public class SchemaInsert extends SchemaStatement
 {
@@ -47,9 +46,9 @@ public class SchemaInsert extends SchemaStatement
     private final String insertStatement;
     private final BatchStatement.Type batchType;
 
-    public SchemaInsert(Timer timer, StressSettings settings, PartitionGenerator generator, SeedManager seedManager, Distribution batchSize, RatioDistribution useRatio, RatioDistribution rowPopulation, Integer thriftId, PreparedStatement statement, ConsistencyLevel cl, BatchStatement.Type batchType)
+    public SchemaInsert(Timer timer, StressSettings settings, PartitionGenerator generator, SeedManager seedManager, Distribution batchSize, RatioDistribution useRatio, RatioDistribution rowPopulation, PreparedStatement statement, ConsistencyLevel cl, BatchStatement.Type batchType)
     {
-        super(timer, settings, new DataSpec(generator, seedManager, batchSize, useRatio, rowPopulation), statement, statement.getVariables().asList().stream().map(d -> d.getName()).collect(Collectors.toList()), thriftId, cl);
+        super(timer, settings, new DataSpec(generator, seedManager, batchSize, useRatio, rowPopulation), statement, statement.getVariables().asList().stream().map(d -> d.getName()).collect(Collectors.toList()), cl);
         this.batchType = batchType;
         this.insertStatement = null;
         this.tableSchema = null;
@@ -58,9 +57,9 @@ public class SchemaInsert extends SchemaStatement
     /**
      * Special constructor for offline use
      */
-    public SchemaInsert(Timer timer, StressSettings settings, PartitionGenerator generator, SeedManager seedManager, RatioDistribution useRatio, RatioDistribution rowPopulation, Integer thriftId, String statement, String tableSchema)
+    public SchemaInsert(Timer timer, StressSettings settings, PartitionGenerator generator, SeedManager seedManager, RatioDistribution useRatio, RatioDistribution rowPopulation, String statement, String tableSchema)
     {
-        super(timer, settings, new DataSpec(generator, seedManager, new DistributionFixed(1), useRatio, rowPopulation), null, generator.getColumnNames(), thriftId, ConsistencyLevel.ONE);
+        super(timer, settings, new DataSpec(generator, seedManager, new DistributionFixed(1), useRatio, rowPopulation), null, generator.getColumnNames(), ConsistencyLevel.ONE);
         this.batchType = BatchStatement.Type.UNLOGGED;
         this.insertStatement = statement;
         this.tableSchema = tableSchema;
@@ -109,29 +108,6 @@ public class SchemaInsert extends SchemaStatement
         }
     }
 
-    private class ThriftRun extends Runner
-    {
-        final ThriftClient client;
-
-        private ThriftRun(ThriftClient client)
-        {
-            this.client = client;
-        }
-
-        public boolean run() throws Exception
-        {
-            for (PartitionIterator iterator : partitions)
-            {
-                while (iterator.hasNext())
-                {
-                    client.execute_prepared_cql3_query(thriftId, iterator.getToken(), thriftRowArgs(iterator.next()), settings.command.consistencyLevel);
-                    rowCount += 1;
-                }
-            }
-            return true;
-        }
-    }
-
     private class OfflineRun extends Runner
     {
         final StressCQLSSTableWriter writer;
@@ -148,7 +124,7 @@ public class SchemaInsert extends SchemaStatement
                 while (iterator.hasNext())
                 {
                     Row row = iterator.next();
-                    writer.rawAddRow(thriftRowArgs(row));
+                    writer.rawAddRow(rowArgs(row));
                     rowCount += 1;
                 }
             }
@@ -168,12 +144,6 @@ public class SchemaInsert extends SchemaStatement
         return true;
     }
 
-    @Override
-    public void run(ThriftClient client) throws IOException
-    {
-        timeWithRetry(new ThriftRun(client));
-    }
-
     public StressCQLSSTableWriter createWriter(ColumnFamilyStore cfs, int bufferSize, boolean makeRangeAware)
     {
         return StressCQLSSTableWriter.builder()


Mime
View raw message