diff --git a/CHANGES.txt b/CHANGES.txt index 520fc832e2..068d1918b9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,7 @@ * avoid replaying hints to dropped columnfamilies (CASSANDRA-2685) * add placeholders for missing rows in range query pseudo-RR (CASSANDRA-2680) * remove no-op HHOM.renameHints (CASSANDRA-2693) + * clone super columns to avoid modifying them during flush (CASSANDRA-2675) 0.8.0-final @@ -33,6 +34,8 @@ * fix StackOverflowError when building from eclipse (CASSANDRA-2687) * only provide replication_factor to strategy_options "help" for SimpleStrategy, OldNetworkTopologyStrategy (CASSANDRA-2678) + * fix exception adding validators to non-string columns (CASSANDRA-2696) + * avoid instantiating DatabaseDescriptor in JDBC (CASSANDRA-2694) 0.8.0-rc1 diff --git a/bin/cassandra b/bin/cassandra index f97cc6fedc..6e7a25f92e 100755 --- a/bin/cassandra +++ b/bin/cassandra @@ -19,6 +19,7 @@ # OPTIONS: # -f: start in foreground # -p : log the pid to a file (useful to kill it later) +# -v: print version string and exit # CONTROLLING STARTUP: # @@ -129,7 +130,7 @@ launch_service() } # Parse any command line options. -args=`getopt fhp:bD: "$@"` +args=`getopt vfhp:bD: "$@"` eval set -- "$args" classname="org.apache.cassandra.thrift.CassandraDaemon" @@ -148,6 +149,10 @@ while true; do echo "Usage: $0 [-f] [-h] [-p pidfile]" exit 0 ;; + -v) + $JAVA -cp $CLASSPATH org.apache.cassandra.tools.GetVersion + exit 0 + ;; -D) properties="$properties -D$2" shift 2 diff --git a/build.xml b/build.xml index 693ce24f01..47c0dd4c3a 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ - + diff --git a/debian/changelog b/debian/changelog index d65ccbb421..aa2fba7304 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cassandra (0.8.0) unstable; urgency=low + + * New release + + -- Eric Evans Mon, 23 May 2011 15:59:48 -0500 + cassandra (0.8.0~rc1) unstable; urgency=low * Release candidate diff --git a/drivers/py/cqlsh b/drivers/py/cqlsh index 338aeae784..49eb206c10 100755 --- a/drivers/py/cqlsh +++ b/drivers/py/cqlsh @@ -24,6 +24,7 @@ import sys import readline import os import re +import time try: import cql @@ -129,7 +130,13 @@ class Shell(cmd.Cmd): statement = self.get_statement(input) if not statement: return - self.cursor.execute(statement) + for i in range(1,4): + try: + self.cursor.execute(statement) + break + except cql.IntegrityError, err: + self.printerr("Attempt #%d: %s" % (i, str(err)), color=RED) + time.sleep(1*i) if self.cursor.description is _COUNT_DESCRIPTION: if self.cursor.result: print self.cursor.result[0] diff --git a/drivers/py/setup.py b/drivers/py/setup.py index d26e3c6aa6..f09d6ca506 100755 --- a/drivers/py/setup.py +++ b/drivers/py/setup.py @@ -20,7 +20,7 @@ from os.path import abspath, join, dirname setup( name="cql", - version="1.0.2", + version="1.0.3", description="Cassandra Query Language driver", long_description=open(abspath(join(dirname(__file__), 'README'))).read(), url="http://cassandra.apache.org", diff --git a/examples/bmt/CassandraBulkLoader.java b/examples/bmt/CassandraBulkLoader.java deleted file mode 100644 index 6fb1a91e1a..0000000000 --- a/examples/bmt/CassandraBulkLoader.java +++ /dev/null @@ -1,293 +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. - */ - - /** - * Cassandra has a back door called the Binary Memtable. The purpose of this backdoor is to - * mass import large amounts of data, without using the Thrift interface. - * - * Inserting data through the binary memtable, allows you to skip the commit log overhead, and an ack - * from Thrift on every insert. The example below utilizes Hadoop to generate all the data necessary - * to send to Cassandra, and sends it using the Binary Memtable interface. What Hadoop ends up doing is - * creating the actual data that gets put into an SSTable as if you were using Thrift. With enough Hadoop nodes - * inserting the data, the bottleneck at this point should become the network. - * - * We recommend adjusting the compaction threshold to 0, while the import is running. After the import, you need - * to run `nodeprobe -host flush_binary ` on every node, as this will flush the remaining data still left - * in memory to disk. Then it's recommended to adjust the compaction threshold to it's original value. - * - * The example below is a sample Hadoop job, and it inserts SuperColumns. It can be tweaked to work with normal Columns. - * - * You should construct your data you want to import as rows delimited by a new line. You end up grouping by - * in the mapper, so that the end result generates the data set into a column oriented subset. Once you get to the - * reduce aspect, you can generate the ColumnFamilies you want inserted, and send it to your nodes. - * - * For Cassandra 0.6.4, we modified this example to wait for acks from all Cassandra nodes for each row - * before proceeding to the next. This means to keep Cassandra similarly busy you can either - * 1) add more reducer tasks, - * 2) remove the "wait for acks" block of code, - * 3) parallelize the writing of rows to Cassandra, e.g. with an Executor. - * - * THIS CANNOT RUN ON THE SAME IP ADDRESS AS A CASSANDRA INSTANCE. - */ - -package org.apache.cassandra.bulkloader; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -import com.google.common.base.Charsets; - -import org.apache.cassandra.config.CFMetaData; -import org.apache.cassandra.config.ConfigurationException; -import org.apache.cassandra.config.DatabaseDescriptor; -import org.apache.cassandra.db.Column; -import org.apache.cassandra.db.ColumnFamily; -import org.apache.cassandra.db.ColumnFamilyType; -import org.apache.cassandra.db.RowMutation; -import org.apache.cassandra.db.filter.QueryPath; -import org.apache.cassandra.io.util.DataOutputBuffer; -import org.apache.cassandra.net.IAsyncResult; -import org.apache.cassandra.net.Message; -import org.apache.cassandra.net.MessagingService; -import org.apache.cassandra.service.StorageService; -import org.apache.cassandra.utils.FBUtilities; -import org.apache.cassandra.utils.ByteBufferUtil; -import org.apache.hadoop.filecache.DistributedCache; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapred.*; - -public class CassandraBulkLoader { - public static class Map extends MapReduceBase implements Mapper { - public void map(Text key, Text value, OutputCollector output, Reporter reporter) throws IOException { - // This is a simple key/value mapper. - output.collect(key, value); - } - } - - public static class Reduce extends MapReduceBase implements Reducer { - private Path[] localFiles; - private JobConf jobconf; - - public void configure(JobConf job) { - this.jobconf = job; - String cassConfig; - - // Get the cached files - try - { - localFiles = DistributedCache.getLocalCacheFiles(job); - } - catch (IOException e) - { - throw new RuntimeException(e); - } - cassConfig = localFiles[0].getParent().toString(); - - System.setProperty("storage-config",cassConfig); - - try - { - StorageService.instance.initClient(); - } - catch (Exception e) - { - throw new RuntimeException(e); - } - try - { - Thread.sleep(10*1000); - } - catch (InterruptedException e) - { - throw new RuntimeException(e); - } - } - - public void close() - { - try - { - // release the cache - DistributedCache.releaseCache(new URI("/cassandra/storage-conf.xml#storage-conf.xml"), this.jobconf); - } - catch (IOException e) - { - throw new RuntimeException(e); - } - catch (URISyntaxException e) - { - throw new RuntimeException(e); - } - try - { - // Sleep just in case the number of keys we send over is small - Thread.sleep(3*1000); - } - catch (InterruptedException e) - { - throw new RuntimeException(e); - } - StorageService.instance.stopClient(); - } - - public void reduce(Text key, Iterator values, OutputCollector output, Reporter reporter) throws IOException - { - ColumnFamily columnFamily; - String keyspace = "Keyspace1"; - String cfName = "Super1"; - Message message; - List columnFamilies; - columnFamilies = new LinkedList(); - String line; - - /* Create a column family */ - columnFamily = ColumnFamily.create(keyspace, cfName); - while (values.hasNext()) { - // Split the value (line based on your own delimiter) - line = values.next().toString(); - String[] fields = line.split("\1"); - String SuperColumnName = fields[1]; - String ColumnName = fields[2]; - String ColumnValue = fields[3]; - int timestamp = 0; - columnFamily.addColumn(new QueryPath(cfName, - ByteBufferUtil.bytes(SuperColumnName), - ByteBufferUtil.bytes(ColumnName)), - ByteBufferUtil.bytes(ColumnValue), - timestamp); - } - - columnFamilies.add(columnFamily); - - /* Get serialized message to send to cluster */ - message = createMessage(keyspace, key.getBytes(), cfName, columnFamilies); - List results = new ArrayList(); - for (InetAddress endpoint: StorageService.instance.getNaturalEndpoints(keyspace, ByteBufferUtil.bytes(key))) - { - /* Send message to end point */ - results.add(MessagingService.instance().sendRR(message, endpoint)); - } - /* wait for acks */ - for (IAsyncResult result : results) - { - try - { - result.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS); - } - catch (TimeoutException e) - { - // you should probably add retry logic here - throw new RuntimeException(e); - } - } - - output.collect(key, new Text(" inserted into Cassandra node(s)")); - } - } - - public static void runJob(String[] args) - { - JobConf conf = new JobConf(CassandraBulkLoader.class); - - if(args.length >= 4) - { - conf.setNumReduceTasks(new Integer(args[3])); - } - - try - { - // We store the cassandra storage-conf.xml on the HDFS cluster - DistributedCache.addCacheFile(new URI("/cassandra/storage-conf.xml#storage-conf.xml"), conf); - } - catch (URISyntaxException e) - { - throw new RuntimeException(e); - } - conf.setInputFormat(KeyValueTextInputFormat.class); - conf.setJobName("CassandraBulkLoader_v2"); - conf.setMapperClass(Map.class); - conf.setReducerClass(Reduce.class); - - conf.setOutputKeyClass(Text.class); - conf.setOutputValueClass(Text.class); - - FileInputFormat.setInputPaths(conf, new Path(args[1])); - FileOutputFormat.setOutputPath(conf, new Path(args[2])); - try - { - JobClient.runJob(conf); - } - catch (IOException e) - { - throw new RuntimeException(e); - } - } - - public static Message createMessage(String keyspace, byte[] key, String columnFamily, List columnFamilies) - { - ColumnFamily baseColumnFamily; - DataOutputBuffer bufOut = new DataOutputBuffer(); - RowMutation rm; - Message message; - Column column; - - /* Get the first column family from list, this is just to get past validation */ - baseColumnFamily = new ColumnFamily(ColumnFamilyType.Standard, - DatabaseDescriptor.getComparator(keyspace, columnFamily), - DatabaseDescriptor.getSubComparator(keyspace, columnFamily), - CFMetaData.getId(keyspace, columnFamily)); - - for(ColumnFamily cf : columnFamilies) { - bufOut.reset(); - ColumnFamily.serializer().serializeWithIndexes(cf, bufOut); - byte[] data = new byte[bufOut.getLength()]; - System.arraycopy(bufOut.getData(), 0, data, 0, bufOut.getLength()); - - column = new Column(FBUtilities.toByteBuffer(cf.id()), ByteBuffer.wrap(data), 0); - baseColumnFamily.addColumn(column); - } - rm = new RowMutation(keyspace, ByteBuffer.wrap(key)); - rm.add(baseColumnFamily); - - try - { - /* Make message */ - message = rm.makeRowMutationMessage(StorageService.Verb.BINARY, MessagingService.version_); - } - catch (IOException e) - { - throw new RuntimeException(e); - } - - return message; - } - public static void main(String[] args) throws Exception - { - runJob(args); - } -} diff --git a/examples/bmt/README.txt b/examples/bmt/README.txt deleted file mode 100644 index 78ba11c09d..0000000000 --- a/examples/bmt/README.txt +++ /dev/null @@ -1,34 +0,0 @@ -This is an example for the deprecated BinaryMemtable bulk-load interface. - -Inserting data through the binary memtable, allows you to skip the -commit log overhead, and an ack from Thrift on every insert. The -example below utilizes Hadoop to generate all the data necessary to -send to Cassandra, and sends it using the Binary Memtable -interface. What Hadoop ends up doing is creating the actual data that -gets put into an SSTable as if you were using Thrift. With enough -Hadoop nodes inserting the data, the bottleneck at this point should -become the network. - -We recommend adjusting the compaction threshold to 0 while the import -is running. After the import, you need to run `nodeprobe -host -flush_binary ` on every node, as this will flush the -remaining data still left in memory to disk. Then it's recommended to -adjust the compaction threshold to it's original value. - -The example in CassandraBulkLoader.java is a sample Hadoop job that -inserts SuperColumns. It can be tweaked to work with normal Columns. - -You should construct your data you want to import as rows delimited by -a new line. You end up grouping by in the mapper, so that -the end result generates the data set into a column oriented -subset. Once you get to the reduce aspect, you can generate the -ColumnFamilies you want inserted, and send it to your nodes. - -For Cassandra 0.6.4, we modified this example to wait for acks from -all Cassandra nodes for each row before proceeding to the next. This -means to keep Cassandra similarly busy you can either -1) add more reducer tasks, -2) remove the "wait for acks" block of code, -3) parallelize the writing of rows to Cassandra, e.g. with an Executor. - -THIS CANNOT RUN ON THE SAME IP ADDRESS AS A CASSANDRA INSTANCE. diff --git a/examples/hadoop_word_count/src/WordCount.java b/examples/hadoop_word_count/src/WordCount.java index f66d6ccaf2..ddda2c3608 100644 --- a/examples/hadoop_word_count/src/WordCount.java +++ b/examples/hadoop_word_count/src/WordCount.java @@ -20,9 +20,9 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.*; -import org.apache.cassandra.hadoop.avro.Column; -import org.apache.cassandra.hadoop.avro.ColumnOrSuperColumn; -import org.apache.cassandra.hadoop.avro.Mutation; +import org.apache.cassandra.thrift.Column; +import org.apache.cassandra.thrift.ColumnOrSuperColumn; +import org.apache.cassandra.thrift.Mutation; import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java index 2ad54d68c0..05160661f1 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationException.java @@ -334,21 +334,5 @@ public class AuthenticationException extends Exception implements org.apache.thr } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java index 1cec461883..e0d5c50eb2 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/AuthenticationRequest.java @@ -379,21 +379,5 @@ public class AuthenticationRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -4785,22 +4769,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class set_keyspace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -5092,22 +5060,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class set_keyspace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -5396,22 +5348,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -5928,22 +5864,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -6608,22 +6528,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_slice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7238,22 +7142,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_slice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7861,22 +7749,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_count_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -8491,22 +8363,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_count_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9076,22 +8932,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class multiget_slice_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9734,22 +9574,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class multiget_slice_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10387,22 +10211,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class multiget_count_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11045,22 +10853,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class multiget_count_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11676,22 +11468,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_range_slices_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12296,22 +12072,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_range_slices_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12919,22 +12679,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_indexed_slices_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -13539,22 +13283,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class get_indexed_slices_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14162,22 +13890,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class insert_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14792,22 +14504,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class insert_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15284,22 +14980,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class add_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15914,22 +15594,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class add_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -16406,22 +16070,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class remove_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17031,24 +16679,6 @@ public class Cassandra { // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator. } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class remove_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17525,22 +17155,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class remove_counter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18057,22 +17671,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class remove_counter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18549,22 +18147,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class batch_mutate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19073,22 +18655,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class batch_mutate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19565,22 +19131,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class truncate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19872,22 +19422,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class truncate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20270,22 +19804,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_schema_versions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20474,22 +19992,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_schema_versions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20937,22 +20439,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_keyspaces_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21141,22 +20627,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_keyspaces_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21576,22 +21046,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_cluster_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21780,22 +21234,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_cluster_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22083,22 +21521,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_version_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22287,22 +21709,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_version_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22590,22 +21996,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_ring_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22897,22 +22287,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_ring_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23332,22 +22706,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_partitioner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23536,22 +22894,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_partitioner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23839,22 +23181,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_snitch_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24043,22 +23369,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_snitch_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24346,22 +23656,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_keyspace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24653,22 +23947,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_keyspace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25145,22 +24423,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_splits_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25742,22 +25004,6 @@ public class Cassandra { // alas, we cannot check 'keys_per_split' because it's a primitive and you chose the non-beans generator. } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class describe_splits_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26176,22 +25422,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_add_column_family_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26484,22 +25714,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_add_column_family_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26975,22 +26189,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_drop_column_family_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27282,22 +26480,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_drop_column_family_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27773,22 +26955,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_add_keyspace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28081,22 +27247,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_add_keyspace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28572,22 +27722,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_drop_keyspace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28879,22 +28013,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_drop_keyspace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -29370,22 +28488,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_update_keyspace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -29678,22 +28780,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_update_keyspace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30169,22 +29255,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_update_column_family_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30477,22 +29547,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class system_update_column_family_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30968,22 +30022,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class execute_cql_query_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -31399,22 +30437,6 @@ public class Cassandra { } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } public static class execute_cql_query_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -32079,22 +31101,6 @@ public class Cassandra { // check for required fields } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java index 375bdba3db..10627ca8f8 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java @@ -2619,23 +2619,5 @@ public class CfDef implements org.apache.thrift.TBase, jav } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java index 0a27d336b9..12f8d5df2f 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java @@ -639,23 +639,5 @@ public class Column implements org.apache.thrift.TBase, } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java index 4075662a91..c35d8ab3eb 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java @@ -647,21 +647,5 @@ public class ColumnDef implements org.apache.thrift.TBase, } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java index e36f1800d6..58d471ee7d 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java @@ -529,23 +529,5 @@ public class Deletion implements org.apache.thrift.TBase, jav } } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java index 1d1553d755..b48bec0963 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java @@ -428,21 +428,5 @@ public class Mutation implements org.apache.thrift.TBase cf_def.max_compaction_threshold) && - cf_def.max_compaction_threshold != 0) - { - throw new ConfigurationException("min_compaction_threshold cannot be greater than max_compaction_threshold"); - } - } - else if (cf_def.isSetMin_compaction_threshold()) - { - if (cf_def.min_compaction_threshold > DEFAULT_MAX_COMPACTION_THRESHOLD) - { - throw new ConfigurationException("min_compaction_threshold cannot be greather than max_compaction_threshold (default " + - DEFAULT_MAX_COMPACTION_THRESHOLD + ")"); - } - } - else if (cf_def.isSetMax_compaction_threshold()) - { - if (cf_def.max_compaction_threshold < DEFAULT_MIN_COMPACTION_THRESHOLD && cf_def.max_compaction_threshold != 0) { - throw new ConfigurationException("max_compaction_threshold cannot be less than min_compaction_threshold"); - } - } - else - { - //Defaults are valid. - } - } - public static void validateMinMaxCompactionThresholds(org.apache.cassandra.db.migration.avro.CfDef cf_def) throws ConfigurationException { if (cf_def.min_compaction_threshold != null && cf_def.max_compaction_threshold != null) @@ -945,16 +915,6 @@ public final class CFMetaData } } - public static void validateMemtableSettings(org.apache.cassandra.thrift.CfDef cf_def) throws ConfigurationException - { - if (cf_def.isSetMemtable_flush_after_mins()) - DatabaseDescriptor.validateMemtableFlushPeriod(cf_def.memtable_flush_after_mins); - if (cf_def.isSetMemtable_throughput_in_mb()) - DatabaseDescriptor.validateMemtableThroughput(cf_def.memtable_throughput_in_mb); - if (cf_def.isSetMemtable_operations_in_millions()) - DatabaseDescriptor.validateMemtableOperations(cf_def.memtable_operations_in_millions); - } - public static void validateMemtableSettings(org.apache.cassandra.db.migration.avro.CfDef cf_def) throws ConfigurationException { if (cf_def.memtable_flush_after_mins != null) @@ -965,13 +925,6 @@ public final class CFMetaData DatabaseDescriptor.validateMemtableOperations(cf_def.memtable_operations_in_millions); } - public static void validateAliasCompares(org.apache.cassandra.db.migration.avro.CfDef cf_def) throws ConfigurationException - { - AbstractType comparator = TypeParser.parse(cf_def.comparator_type); - if (cf_def.key_alias != null) - comparator.validate(cf_def.key_alias); - } - public ColumnDefinition getColumnDefinition(ByteBuffer name) { return column_metadata.get(name); diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java index f76b6f22f0..2d48c2272f 100644 --- a/src/java/org/apache/cassandra/config/Config.java +++ b/src/java/org/apache/cassandra/config/Config.java @@ -77,8 +77,6 @@ public class Config public Boolean snapshot_before_compaction = false; public Integer compaction_thread_priority = Thread.MIN_PRIORITY; - public Integer binary_memtable_throughput_in_mb = 256; - /* if the size of columns or super-columns are more than this, indexing will kick in */ public Integer column_index_size_in_kb = 64; public Integer in_memory_compaction_limit_in_mb = 256; diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java index 24c9cbc4b2..2d03df0e1c 100644 --- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java +++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java @@ -937,11 +937,6 @@ public class DatabaseDescriptor return conf.sliced_buffer_size_in_kb; } - public static int getBMTThreshold() - { - return conf.binary_memtable_throughput_in_mb; - } - public static int getCompactionThreadPriority() { return conf.compaction_thread_priority; diff --git a/src/java/org/apache/cassandra/db/BinaryMemtable.java b/src/java/org/apache/cassandra/db/BinaryMemtable.java deleted file mode 100644 index 01fa10a396..0000000000 --- a/src/java/org/apache/cassandra/db/BinaryMemtable.java +++ /dev/null @@ -1,160 +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.db; - -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 java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.apache.cassandra.config.DatabaseDescriptor; -import org.apache.cassandra.db.commitlog.ReplayPosition; -import org.apache.cassandra.dht.IPartitioner; -import org.apache.cassandra.io.sstable.SSTableReader; -import org.apache.cassandra.io.sstable.SSTableWriter; -import org.apache.cassandra.service.StorageService; -import org.apache.cassandra.utils.WrappedRunnable; -import org.cliffc.high_scale_lib.NonBlockingHashMap; - -public class BinaryMemtable implements IFlushable -{ - private static final Logger logger = LoggerFactory.getLogger(BinaryMemtable.class); - private final int threshold = DatabaseDescriptor.getBMTThreshold() * 1024 * 1024; - private final AtomicInteger currentSize = new AtomicInteger(0); - - /* Table and ColumnFamily name are used to determine the ColumnFamilyStore */ - private boolean isFrozen = false; - private final Map columnFamilies = new NonBlockingHashMap(); - /* Lock and Condition for notifying new clients about Memtable switches */ - private final Lock lock = new ReentrantLock(); - Condition condition; - private final IPartitioner partitioner = StorageService.getPartitioner(); - private final ColumnFamilyStore cfs; - - public BinaryMemtable(ColumnFamilyStore cfs) - { - this.cfs = cfs; - condition = lock.newCondition(); - } - - boolean isThresholdViolated() - { - return currentSize.get() >= threshold; - } - - /* - * This version is used by the external clients to put data into - * the memtable. This version will respect the threshold and flush - * the memtable to disk when the size exceeds the threshold. - */ - void put(DecoratedKey key, ByteBuffer buffer) - { - if (isThresholdViolated()) - { - lock.lock(); - try - { - if (!isFrozen) - { - isFrozen = true; - cfs.submitFlush(this, new CountDownLatch(1), null); - cfs.switchBinaryMemtable(key, buffer); - } - else - { - cfs.applyBinary(key, buffer); - } - } - finally - { - lock.unlock(); - } - } - else - { - resolve(key, buffer); - } - } - - public boolean isClean() - { - return columnFamilies.isEmpty(); - } - - private void resolve(DecoratedKey key, ByteBuffer buffer) - { - columnFamilies.put(key, buffer); - currentSize.addAndGet(buffer.remaining() + key.key.remaining()); - } - - private List getSortedKeys() - { - assert !columnFamilies.isEmpty(); - logger.info("Sorting " + this); - List keys = new ArrayList(columnFamilies.keySet()); - Collections.sort(keys); - return keys; - } - - private SSTableReader writeSortedContents(List sortedKeys, ReplayPosition context) throws IOException - { - logger.info("Writing " + this); - SSTableWriter writer = cfs.createFlushWriter(sortedKeys.size(), DatabaseDescriptor.getBMTThreshold(), context); - - for (DecoratedKey key : sortedKeys) - { - ByteBuffer bytes = columnFamilies.get(key); - assert bytes.remaining() > 0; - writer.append(key, bytes); - } - SSTableReader sstable = writer.closeAndOpenReader(); - logger.info("Completed flushing " + writer.getFilename()); - return sstable; - } - - public void flushAndSignal(final CountDownLatch latch, ExecutorService sorter, final ExecutorService writer, final ReplayPosition context) - { - sorter.execute(new Runnable() - { - public void run() - { - final List sortedKeys = getSortedKeys(); - writer.execute(new WrappedRunnable() - { - public void runMayThrow() throws IOException - { - cfs.addSSTable(writeSortedContents(sortedKeys, context)); - latch.countDown(); - } - }); - } - }); - } -} diff --git a/src/java/org/apache/cassandra/db/ColumnFamily.java b/src/java/org/apache/cassandra/db/ColumnFamily.java index b617e41b91..13614d6c37 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamily.java +++ b/src/java/org/apache/cassandra/db/ColumnFamily.java @@ -142,6 +142,11 @@ public class ColumnFamily implements IColumnContainer, IIterableColumns return columns.size(); } + public boolean isEmpty() + { + return columns.isEmpty(); + } + public boolean isSuper() { return getType() == ColumnFamilyType.Super; diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 9113bffd20..6e5dba7972 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -25,7 +25,6 @@ import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Pattern; @@ -72,13 +71,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean private static Logger logger = LoggerFactory.getLogger(ColumnFamilyStore.class); /* - * submitFlush first puts [Binary]Memtable.getSortedContents on the flushSorter executor, - * which then puts the sorted results on the writer executor. This is because sorting is CPU-bound, - * and writing is disk-bound; we want to be able to do both at once. When the write is complete, + * maybeSwitchMemtable puts Memtable.getSortedContents on the writer executor. When the write is complete, * we turn the writer into an SSTableReader and add it to ssTables_ where it is available for reads. * - * For BinaryMemtable that's about all that happens. For live Memtables there are two other things - * that switchMemtable does (which should be the only caller of submitFlush in this case). + * There are two other things that maybeSwitchMemtable does. * First, it puts the Memtable into memtablesPendingFlush, where it stays until the flush is complete * and it's been added as an SSTableReader to ssTables_. Second, it adds an entry to commitLogUpdater * that waits for the flush to complete, then calls onMemtableFlush. This allows multiple flushes @@ -86,13 +82,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean * which is necessary for replay in case of a restart since CommitLog assumes that when onMF is * called, all data up to the given context has been persisted to SSTables. */ - private static final ExecutorService flushSorter - = new JMXEnabledThreadPoolExecutor(Runtime.getRuntime().availableProcessors(), - StageManager.KEEPALIVE, - TimeUnit.SECONDS, - new LinkedBlockingQueue(Runtime.getRuntime().availableProcessors()), - new NamedThreadFactory("FlushSorter"), - "internal"); private static final ExecutorService flushWriter = new JMXEnabledThreadPoolExecutor(DatabaseDescriptor.getFlushWriters(), StageManager.KEEPALIVE, @@ -134,9 +123,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean private final ConcurrentSkipListMap indexedColumns; - // TODO binarymemtable ops are not threadsafe (do they need to be?) - private AtomicReference binaryMemtable; - private LatencyTracker readStats = new LatencyTracker(); private LatencyTracker writeStats = new LatencyTracker(); @@ -257,7 +243,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean this.keyCacheSaveInSeconds = new DefaultInteger(metadata.getKeyCacheSavePeriodInSeconds()); this.partitioner = partitioner; fileIndexGenerator.set(generation); - binaryMemtable = new AtomicReference(new BinaryMemtable(this)); if (logger.isDebugEnabled()) logger.debug("Starting CFS {}", columnFamily); @@ -658,7 +643,11 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean } final CountDownLatch latch = new CountDownLatch(icc.size()); for (ColumnFamilyStore cfs : icc) - submitFlush(cfs.data.switchMemtable(), latch, ctx); + { + Memtable memtable = cfs.data.switchMemtable(); + logger.info("Enqueuing flush of {}", memtable); + memtable.flushAndSignal(latch, flushWriter, ctx); + } // we marked our memtable as frozen as part of the concurrency control, // so even if there was nothing to flush we need to switch it out @@ -699,12 +688,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean : DatabaseDescriptor.getCFMetaData(metadata.cfId) == null; } - void switchBinaryMemtable(DecoratedKey key, ByteBuffer buffer) - { - binaryMemtable.set(new BinaryMemtable(this)); - binaryMemtable.get().put(key, buffer); - } - public void forceFlushIfExpired() { if (getMemtableThreadSafe().isExpired()) @@ -735,14 +718,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean future.get(); } - public void forceFlushBinary() - { - if (binaryMemtable.get().isClean()) - return; - - submitFlush(binaryMemtable.get(), new CountDownLatch(1), null); - } - public void updateRowCache(DecoratedKey key, ColumnFamily columnFamily) { if (rowCache.isPutCopying()) @@ -793,20 +768,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean return flushRequested ? mt : null; } - /* - * Insert/Update the column family for this key. param @ lock - lock that - * Caller is responsible for acquiring Table.flusherLock! - * param @ lock - lock that needs to be used. - * needs to be used. param @ key - key for update/insert param @ - * columnFamily - columnFamily changes - */ - void applyBinary(DecoratedKey key, ByteBuffer buffer) - { - long start = System.nanoTime(); - binaryMemtable.get().put(key, buffer); - writeStats.addNano(System.nanoTime() - start); - } - public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore) { // in case of a timestamp tie, tombstones get priority over non-tombstones. @@ -998,21 +959,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean } } - /** - * submits flush sort on the flushSorter executor, which will in turn submit to flushWriter when sorted. - * TODO because our executors use CallerRunsPolicy, when flushSorter fills up, no writes will proceed - * because the next flush will start executing on the caller, mutation-stage thread that has the - * flush write lock held. (writes aquire this as a read lock before proceeding.) - * This is good, because it backpressures flushes, but bad, because we can't write until that last - * flushing thread finishes sorting, which will almost always be longer than any of the flushSorter threads proper - * (since, by definition, it started last). - */ - void submitFlush(IFlushable flushable, CountDownLatch latch, ReplayPosition context) - { - logger.info("Enqueuing flush of {}", flushable); - flushable.flushAndSignal(latch, flushSorter, flushWriter, context); - } - public long getMemtableColumnsCount() { return getMemtableThreadSafe().getOperations(); diff --git a/src/java/org/apache/cassandra/db/CompactionManager.java b/src/java/org/apache/cassandra/db/CompactionManager.java index f3a8caec40..7130cfb93c 100644 --- a/src/java/org/apache/cassandra/db/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/CompactionManager.java @@ -490,6 +490,12 @@ public class CompactionManager implements CompactionManagerMBean int doCompaction(ColumnFamilyStore cfs, Collection sstables, int gcBefore) throws IOException { + if (sstables.size() < 2) + { + logger.info("Nothing to compact in " + cfs.getColumnFamilyName() + "; use forceUserDefinedCompaction if you wish to force compaction of single sstables (e.g. for tombstone collection)"); + return 0; + } + Table table = cfs.table; // If the compaction file path is null that means we have no space left for this compaction. diff --git a/src/java/org/apache/cassandra/db/IFlushable.java b/src/java/org/apache/cassandra/db/IFlushable.java deleted file mode 100644 index 1be11c4e95..0000000000 --- a/src/java/org/apache/cassandra/db/IFlushable.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.apache.cassandra.db; -/* - * - * 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.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; - -import org.apache.cassandra.db.commitlog.ReplayPosition; - -public interface IFlushable -{ - public void flushAndSignal(CountDownLatch condition, ExecutorService sorter, ExecutorService writer, ReplayPosition context); -} diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index a17acc2fa7..a57563401c 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -46,7 +46,7 @@ import org.apache.cassandra.io.sstable.SSTableWriter; import org.apache.cassandra.utils.WrappedRunnable; import org.github.jamm.MemoryMeter; -public class Memtable implements Comparable, IFlushable +public class Memtable implements Comparable { private static final Logger logger = LoggerFactory.getLogger(Memtable.class); @@ -256,7 +256,7 @@ public class Memtable implements Comparable, IFlushable return ssTable; } - public void flushAndSignal(final CountDownLatch latch, ExecutorService sorter, final ExecutorService writer, final ReplayPosition context) + public void flushAndSignal(final CountDownLatch latch, ExecutorService writer, final ReplayPosition context) { writer.execute(new WrappedRunnable() { diff --git a/src/java/org/apache/cassandra/db/filter/QueryFilter.java b/src/java/org/apache/cassandra/db/filter/QueryFilter.java index 35d6b11212..d4cccda4a5 100644 --- a/src/java/org/apache/cassandra/db/filter/QueryFilter.java +++ b/src/java/org/apache/cassandra/db/filter/QueryFilter.java @@ -103,7 +103,19 @@ public class QueryFilter public void reduce(IColumn current) { - curCF.addColumn(current); + if (curCF.isSuper() && curCF.isEmpty()) + { + // If it is the first super column we add, we must clone it since other super column may modify + // it otherwise and it could be aliased in a memtable somewhere. We'll also don't have to care about what + // consumers make of the result (for instance CFS.getColumnFamily() call removeDeleted() on the + // result which removes column; which shouldn't be done on the original super column). + assert current instanceof SuperColumn; + curCF.addColumn(((SuperColumn)current).cloneMe()); + } + else + { + curCF.addColumn(current); + } } protected IColumn getReduced() diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java index 136ff9b3cd..40bfac710f 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@ -577,6 +577,8 @@ public class ThriftValidation if (cfType == ColumnFamilyType.Super && c.index_type != null) throw new InvalidRequestException("Secondary indexes are not supported on supercolumns"); } + validateMinMaxCompactionThresholds(cf_def); + validateMemtableSettings(cf_def); } catch (ConfigurationException e) { @@ -602,4 +604,45 @@ public class ThriftValidation Class cls = AbstractReplicationStrategy.getClass(ks_def.strategy_class); AbstractReplicationStrategy.createReplicationStrategy(ks_def.name, cls, tmd, eps, options); } + + public static void validateMinMaxCompactionThresholds(org.apache.cassandra.thrift.CfDef cf_def) throws ConfigurationException + { + if (cf_def.isSetMin_compaction_threshold() && cf_def.isSetMax_compaction_threshold()) + { + if ((cf_def.min_compaction_threshold > cf_def.max_compaction_threshold) + && cf_def.max_compaction_threshold != 0) + { + throw new ConfigurationException("min_compaction_threshold cannot be greater than max_compaction_threshold"); + } + } + else if (cf_def.isSetMin_compaction_threshold()) + { + if (cf_def.min_compaction_threshold > CFMetaData.DEFAULT_MAX_COMPACTION_THRESHOLD) + { + throw new ConfigurationException(String.format("min_compaction_threshold cannot be greather than max_compaction_threshold (default %d)", + CFMetaData.DEFAULT_MAX_COMPACTION_THRESHOLD)); + } + } + else if (cf_def.isSetMax_compaction_threshold()) + { + if (cf_def.max_compaction_threshold < CFMetaData.DEFAULT_MIN_COMPACTION_THRESHOLD && cf_def.max_compaction_threshold != 0) + { + throw new ConfigurationException("max_compaction_threshold cannot be less than min_compaction_threshold"); + } + } + else + { + //Defaults are valid. + } + } + + public static void validateMemtableSettings(org.apache.cassandra.thrift.CfDef cf_def) throws ConfigurationException + { + if (cf_def.isSetMemtable_flush_after_mins()) + DatabaseDescriptor.validateMemtableFlushPeriod(cf_def.memtable_flush_after_mins); + if (cf_def.isSetMemtable_throughput_in_mb()) + DatabaseDescriptor.validateMemtableThroughput(cf_def.memtable_throughput_in_mb); + if (cf_def.isSetMemtable_operations_in_millions()) + DatabaseDescriptor.validateMemtableOperations(cf_def.memtable_operations_in_millions); + } } diff --git a/src/java/org/apache/cassandra/tools/GetVersion.java b/src/java/org/apache/cassandra/tools/GetVersion.java new file mode 100644 index 0000000000..d82306e911 --- /dev/null +++ b/src/java/org/apache/cassandra/tools/GetVersion.java @@ -0,0 +1,26 @@ +/** + * 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.tools; + +import static org.apache.cassandra.utils.FBUtilities.getReleaseVersionString; + +public class GetVersion { + public static void main(String[] args) { + System.out.println(getReleaseVersionString()); + } +} diff --git a/test/system/test_thrift_server.py b/test/system/test_thrift_server.py index 19773b6d54..4e605ddc7b 100644 --- a/test/system/test_thrift_server.py +++ b/test/system/test_thrift_server.py @@ -1393,6 +1393,21 @@ class TestMutations(ThriftTester): assert 'NewColumnFamily' not in [x.name for x in ks1.cf_defs] assert 'Standard1' in [x.name for x in ks1.cf_defs] + # Make a LongType CF and add a validator + newcf = CfDef('Keyspace1', 'NewLongColumnFamily', comparator_type='LongType') + client.system_add_column_family(newcf) + + three = _i64(3) + cd = ColumnDef(three, 'LongType', None, None) + ks1 = client.describe_keyspace('Keyspace1') + modified_cf = [x for x in ks1.cf_defs if x.name=='NewLongColumnFamily'][0] + modified_cf.column_metadata = [cd] + client.system_update_column_family(modified_cf) + + ks1 = client.describe_keyspace('Keyspace1') + server_cf = [x for x in ks1.cf_defs if x.name=='NewLongColumnFamily'][0] + assert server_cf.column_metadata[0].name == _i64(3), server_cf.column_metadata + def test_dynamic_indexes_creation_deletion(self): _set_keyspace('Keyspace1') cfdef = CfDef('Keyspace1', 'BlankCF')