Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: cassandra-rb/cassandra
base: 0c4ca11040
...
head fork: cassandra-rb/cassandra
compare: 936dc20183
  • 3 commits
  • 14 files changed
  • 0 commit comments
  • 2 contributors
1  .travis.yml
View
@@ -3,6 +3,7 @@ rvm:
- 1.9.3
- 1.8.7
env:
+ - CASSANDRA_VERSION=1.2
- CASSANDRA_VERSION=1.1
- CASSANDRA_VERSION=1.0
- CASSANDRA_VERSION=0.8
3  Rakefile
View
@@ -22,7 +22,8 @@ CassandraBinaries = {
'0.7' => 'http://archive.apache.org/dist/cassandra/0.7.9/apache-cassandra-0.7.9-bin.tar.gz',
'0.8' => 'http://archive.apache.org/dist/cassandra/0.8.7/apache-cassandra-0.8.7-bin.tar.gz',
'1.0' => 'http://archive.apache.org/dist/cassandra/1.0.6/apache-cassandra-1.0.6-bin.tar.gz',
- '1.1' => 'http://archive.apache.org/dist/cassandra/1.1.5/apache-cassandra-1.1.5-bin.tar.gz'
+ '1.1' => 'http://archive.apache.org/dist/cassandra/1.1.5/apache-cassandra-1.1.5-bin.tar.gz',
+ '1.2' => 'http://archive.apache.org/dist/cassandra/1.2.1/apache-cassandra-1.2.1-bin.tar.gz'
}
CASSANDRA_HOME = ENV['CASSANDRA_HOME'] || "#{ENV['HOME']}/cassandra"
41 conf/1.2/cassandra.in.sh
View
@@ -0,0 +1,41 @@
+# 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.
+
+if [ "x$CASSANDRA_HOME" = "x" ]; then
+ CASSANDRA_HOME=`dirname $0`/..
+fi
+
+# The directory where Cassandra's configs live (required)
+if [ "x$CASSANDRA_CONF" = "x" ]; then
+ CASSANDRA_CONF=$CASSANDRA_HOME/conf
+fi
+
+# This can be the path to a jar file, or a directory containing the
+# compiled classes. NOTE: This isn't needed by the startup script,
+# it's just used here in constructing the classpath.
+cassandra_bin=$CASSANDRA_HOME/build/classes/main
+cassandra_bin=$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift
+#cassandra_bin=$cassandra_home/build/cassandra.jar
+
+# JAVA_HOME can optionally be set here
+#JAVA_HOME=/usr/local/jdk6
+
+# The java classpath (required)
+CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
+
+for jar in $CASSANDRA_HOME/lib/*.jar; do
+ CLASSPATH=$CLASSPATH:$jar
+done
643 conf/1.2/cassandra.yaml
View
@@ -0,0 +1,643 @@
+# Cassandra storage config YAML
+
+# NOTE:
+# See http://wiki.apache.org/cassandra/StorageConfiguration for
+# full explanations of configuration directives
+# /NOTE
+
+# The name of the cluster. This is mainly used to prevent machines in
+# one logical cluster from joining another.
+cluster_name: 'Test Cluster'
+
+# This defines the number of tokens randomly assigned to this node on the ring
+# The more tokens, relative to other nodes, the larger the proportion of data
+# that this node will store. You probably want all nodes to have the same number
+# of tokens assuming they have equal hardware capability.
+#
+# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
+# and will use the initial_token as described below.
+#
+# Specifying initial_token will override this setting.
+#
+# If you already have a cluster with 1 token per node, and wish to migrate to
+# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
+# num_tokens: 256
+
+# If you haven't specified num_tokens, or have set it to the default of 1 then
+# you should always specify InitialToken when setting up a production
+# cluster for the first time, and often when adding capacity later.
+# The principle is that each node should be given an equal slice of
+# the token ring; see http://wiki.apache.org/cassandra/Operations
+# for more details.
+#
+# If blank, Cassandra will request a token bisecting the range of
+# the heaviest-loaded existing node. If there is no load information
+# available, such as is the case with a new cluster, it will pick
+# a random token, which will lead to hot spots.
+initial_token:
+
+# See http://wiki.apache.org/cassandra/HintedHandoff
+hinted_handoff_enabled: true
+# this defines the maximum amount of time a dead host will have hints
+# generated. After it has been dead this long, hints will be dropped.
+max_hint_window_in_ms: 3600000 # 1 hours
+# throttle in KB's per second, per delivery thread
+hinted_handoff_throttle_in_kb: 1024
+# Number of threads with which to deliver hints;
+# Consider increasing this number when you have multi-dc deployments, since
+# cross-dc handoff tends to be slower
+max_hints_delivery_threads: 2
+
+# The following setting populates the page cache on memtable flush and compaction
+# WARNING: Enable this setting only when the whole node's data fits in memory.
+# Defaults to: false
+# populate_io_cache_on_flush: false
+
+# authentication backend, implementing IAuthenticator; used to identify users
+authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
+
+# authorization backend, implementing IAuthorizer; used to limit access/provide permissions
+authorizer: org.apache.cassandra.auth.AllowAllAuthorizer
+
+# The partitioner is responsible for distributing rows (by key) across
+# nodes in the cluster. Any IPartitioner may be used, including your
+# own as long as it is on the classpath. Out of the box, Cassandra
+# provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner
+# ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}.
+#
+# - RandomPartitioner distributes rows across the cluster evenly by md5.
+# This is the default prior to 1.2 and is retained for compatibility.
+# - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128
+# Hash Function instead of md5. When in doubt, this is the best option.
+# - ByteOrderedPartitioner orders rows lexically by key bytes. BOP allows
+# scanning rows in key order, but the ordering can generate hot spots
+# for sequential insertion workloads.
+# - OrderPreservingPartitioner is an obsolete form of BOP, that stores
+# - keys in a less-efficient format and only works with keys that are
+# UTF8-encoded Strings.
+# - CollatingOPP colates according to EN,US rules rather than lexical byte
+# ordering. Use this as an example if you need custom collation.
+#
+# See http://wiki.apache.org/cassandra/Operations for more on
+# partitioners and token selection.
+partitioner: org.apache.cassandra.dht.Murmur3Partitioner
+
+# directories where Cassandra should store data on disk.
+data_file_directories:
+ - data/data
+
+# commit log
+commitlog_directory: data/commitlog
+
+# policy for data disk failures:
+# stop: shut down gossip and Thrift, leaving the node effectively dead, but
+# still inspectable via JMX.
+# best_effort: stop using the failed disk and respond to requests based on
+# remaining available sstables. This means you WILL see obsolete
+# data at CL.ONE!
+# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
+disk_failure_policy: stop
+
+# Maximum size of the key cache in memory.
+#
+# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
+# minimum, sometimes more. The key cache is fairly tiny for the amount of
+# time it saves, so it's worthwhile to use it at large numbers.
+# The row cache saves even more time, but must store the whole values of
+# its rows, so it is extremely space-intensive. It's best to only use the
+# row cache if you have hot rows or static rows.
+#
+# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
+#
+# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
+key_cache_size_in_mb:
+
+# Duration in seconds after which Cassandra should
+# safe the keys cache. Caches are saved to saved_caches_directory as
+# specified in this configuration file.
+#
+# Saved caches greatly improve cold-start speeds, and is relatively cheap in
+# terms of I/O for the key cache. Row cache saving is much more expensive and
+# has limited use.
+#
+# Default is 14400 or 4 hours.
+key_cache_save_period: 14400
+
+# Number of keys from the key cache to save
+# Disabled by default, meaning all keys are going to be saved
+# key_cache_keys_to_save: 100
+
+# Maximum size of the row cache in memory.
+# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
+#
+# Default value is 0, to disable row caching.
+row_cache_size_in_mb: 0
+
+# Duration in seconds after which Cassandra should
+# safe the row cache. Caches are saved to saved_caches_directory as specified
+# in this configuration file.
+#
+# Saved caches greatly improve cold-start speeds, and is relatively cheap in
+# terms of I/O for the key cache. Row cache saving is much more expensive and
+# has limited use.
+#
+# Default is 0 to disable saving the row cache.
+row_cache_save_period: 0
+
+# Number of keys from the row cache to save
+# Disabled by default, meaning all keys are going to be saved
+# row_cache_keys_to_save: 100
+
+# The provider for the row cache to use.
+#
+# Supported values are: ConcurrentLinkedHashCacheProvider, SerializingCacheProvider
+#
+# SerializingCacheProvider serialises the contents of the row and stores
+# it in native memory, i.e., off the JVM Heap. Serialized rows take
+# significantly less memory than "live" rows in the JVM, so you can cache
+# more rows in a given memory footprint. And storing the cache off-heap
+# means you can use smaller heap sizes, reducing the impact of GC pauses.
+#
+# It is also valid to specify the fully-qualified class name to a class
+# that implements org.apache.cassandra.cache.IRowCacheProvider.
+#
+# Defaults to SerializingCacheProvider
+row_cache_provider: SerializingCacheProvider
+
+# saved caches
+saved_caches_directory: data/saved_caches
+
+# commitlog_sync may be either "periodic" or "batch."
+# When in batch mode, Cassandra won't ack writes until the commit log
+# has been fsynced to disk. It will wait up to
+# commitlog_sync_batch_window_in_ms milliseconds for other writes, before
+# performing the sync.
+#
+# commitlog_sync: batch
+# commitlog_sync_batch_window_in_ms: 50
+#
+# the other option is "periodic" where writes may be acked immediately
+# and the CommitLog is simply synced every commitlog_sync_period_in_ms
+# milliseconds.
+commitlog_sync: periodic
+commitlog_sync_period_in_ms: 10000
+
+# The size of the individual commitlog file segments. A commitlog
+# segment may be archived, deleted, or recycled once all the data
+# in it (potentally from each columnfamily in the system) has been
+# flushed to sstables.
+#
+# The default size is 32, which is almost always fine, but if you are
+# archiving commitlog segments (see commitlog_archiving.properties),
+# then you probably want a finer granularity of archiving; 8 or 16 MB
+# is reasonable.
+commitlog_segment_size_in_mb: 32
+
+# any class that implements the SeedProvider interface and has a
+# constructor that takes a Map<String, String> of parameters will do.
+seed_provider:
+ # Addresses of hosts that are deemed contact points.
+ # Cassandra nodes use this list of hosts to find each other and learn
+ # the topology of the ring. You must change this if you are running
+ # multiple nodes!
+ - class_name: org.apache.cassandra.locator.SimpleSeedProvider
+ parameters:
+ # seeds is actually a comma-delimited list of addresses.
+ # Ex: "<ip1>,<ip2>,<ip3>"
+ - seeds: "127.0.0.1"
+
+# emergency pressure valve: each time heap usage after a full (CMS)
+# garbage collection is above this fraction of the max, Cassandra will
+# flush the largest memtables.
+#
+# Set to 1.0 to disable. Setting this lower than
+# CMSInitiatingOccupancyFraction is not likely to be useful.
+#
+# RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
+# it is most effective under light to moderate load, or read-heavy
+# workloads; under truly massive write load, it will often be too
+# little, too late.
+flush_largest_memtables_at: 0.75
+
+# emergency pressure valve #2: the first time heap usage after a full
+# (CMS) garbage collection is above this fraction of the max,
+# Cassandra will reduce cache maximum _capacity_ to the given fraction
+# of the current _size_. Should usually be set substantially above
+# flush_largest_memtables_at, since that will have less long-term
+# impact on the system.
+#
+# Set to 1.0 to disable. Setting this lower than
+# CMSInitiatingOccupancyFraction is not likely to be useful.
+reduce_cache_sizes_at: 0.85
+reduce_cache_capacity_to: 0.6
+
+# For workloads with more data than can fit in memory, Cassandra's
+# bottleneck will be reads that need to fetch data from
+# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
+# order to allow the operations to enqueue low enough in the stack
+# that the OS and drives can reorder them.
+#
+# On the other hand, since writes are almost never IO bound, the ideal
+# number of "concurrent_writes" is dependent on the number of cores in
+# your system; (8 * number_of_cores) is a good rule of thumb.
+concurrent_reads: 32
+concurrent_writes: 32
+
+# Total memory to use for memtables. Cassandra will flush the largest
+# memtable when this much memory is used.
+# If omitted, Cassandra will set it to 1/3 of the heap.
+# memtable_total_space_in_mb: 2048
+
+# Total space to use for commitlogs. Since commitlog segments are
+# mmapped, and hence use up address space, the default size is 32
+# on 32-bit JVMs, and 1024 on 64-bit JVMs.
+#
+# If space gets above this value (it will round up to the next nearest
+# segment multiple), Cassandra will flush every dirty CF in the oldest
+# segment and remove it. So a small total commitlog space will tend
+# to cause more flush activity on less-active columnfamilies.
+# commitlog_total_space_in_mb: 4096
+
+# This sets the amount of memtable flush writer threads. These will
+# be blocked by disk io, and each one will hold a memtable in memory
+# while blocked. If you have a large heap and many data directories,
+# you can increase this value for better flush performance.
+# By default this will be set to the amount of data directories defined.
+#memtable_flush_writers: 1
+
+# the number of full memtables to allow pending flush, that is,
+# waiting for a writer thread. At a minimum, this should be set to
+# the maximum number of secondary indexes created on a single CF.
+memtable_flush_queue_size: 4
+
+# Whether to, when doing sequential writing, fsync() at intervals in
+# order to force the operating system to flush the dirty
+# buffers. Enable this to avoid sudden dirty buffer flushing from
+# impacting read latencies. Almost always a good idea on SSD:s; not
+# necessarily on platters.
+trickle_fsync: false
+trickle_fsync_interval_in_kb: 10240
+
+# TCP port, for commands and data
+storage_port: 7000
+
+# SSL port, for encrypted communication. Unused unless enabled in
+# encryption_options
+ssl_storage_port: 7001
+
+# Address to bind to and tell other Cassandra nodes to connect to. You
+# _must_ change this if you want multiple nodes to be able to
+# communicate!
+#
+# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
+# will always do the Right Thing *if* the node is properly configured
+# (hostname, name resolution, etc), and the Right Thing is to use the
+# address associated with the hostname (it might not be).
+#
+# Setting this to 0.0.0.0 is always wrong.
+listen_address: localhost
+
+# Address to broadcast to other Cassandra nodes
+# Leaving this blank will set it to the same value as listen_address
+# broadcast_address: 1.2.3.4
+
+
+# Whether to start the native transport server.
+# Currently, only the thrift server is started by default because the native
+# transport is considered beta.
+# Please note that the address on which the native transport is bound is the
+# same as the rpc_address. The port however is different and specified below.
+start_native_transport: false
+# port for the CQL native transport to listen for clients on
+native_transport_port: 9042
+# The minimum and maximum threads for handling requests when the native
+# transport is used. The meaning is those is similar to the one of
+# rpc_min_threads and rpc_max_threads, though the default differ slightly and
+# are the ones below:
+# native_transport_min_threads: 16
+# native_transport_max_threads: 128
+
+
+# Whether to start the thrift rpc server.
+start_rpc: true
+# The address to bind the Thrift RPC service to -- clients connect
+# here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
+# you want Thrift to listen on all interfaces.
+#
+# Leaving this blank has the same effect it does for ListenAddress,
+# (i.e. it will be based on the configured hostname of the node).
+rpc_address: localhost
+# port for Thrift to listen for clients on
+rpc_port: 9160
+
+# enable or disable keepalive on rpc connections
+rpc_keepalive: true
+
+# Cassandra provides three out-of-the-box options for the RPC Server:
+#
+# sync -> One thread per thrift connection. For a very large number of clients, memory
+# will be your limiting factor. On a 64 bit JVM, 128KB is the minimum stack size
+# per thread, and that will correspond to your use of virtual memory (but physical memory
+# may be limited depending on use of stack space).
+#
+# hsha -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
+# asynchronously using a small number of threads that does not vary with the amount
+# of thrift clients (and thus scales well to many clients). The rpc requests are still
+# synchronous (one thread per active request).
+#
+# The default is sync because on Windows hsha is about 30% slower. On Linux,
+# sync/hsha performance is about the same, with hsha of course using less memory.
+#
+# Alternatively, can provide your own RPC server by providing the fully-qualified class name
+# of an o.a.c.t.TServerFactory that can create an instance of it.
+rpc_server_type: sync
+
+# Uncomment rpc_min|max_thread to set request pool size limits.
+#
+# Regardless of your choice of RPC server (see above), the number of maximum requests in the
+# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
+# RPC server, it also dictates the number of clients that can be connected at all).
+#
+# The default is unlimited and thus provide no protection against clients overwhelming the server. You are
+# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
+# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
+#
+# rpc_min_threads: 16
+# rpc_max_threads: 2048
+
+# uncomment to set socket buffer sizes on rpc connections
+# rpc_send_buff_size_in_bytes:
+# rpc_recv_buff_size_in_bytes:
+
+# Frame size for thrift (maximum field length).
+thrift_framed_transport_size_in_mb: 15
+
+# The max length of a thrift message, including all fields and
+# internal thrift overhead.
+thrift_max_message_length_in_mb: 16
+
+# Set to true to have Cassandra create a hard link to each sstable
+# flushed or streamed locally in a backups/ subdirectory of the
+# Keyspace data. Removing these links is the operator's
+# responsibility.
+incremental_backups: false
+
+# Whether or not to take a snapshot before each compaction. Be
+# careful using this option, since Cassandra won't clean up the
+# snapshots for you. Mostly useful if you're paranoid when there
+# is a data format change.
+snapshot_before_compaction: false
+
+# Whether or not a snapshot is taken of the data before keyspace truncation
+# or dropping of column families. The STRONGLY advised default of true
+# should be used to provide data safety. If you set this flag to false, you will
+# lose data on truncation or drop.
+auto_snapshot: true
+
+# Add column indexes to a row after its contents reach this size.
+# Increase if your column values are large, or if you have a very large
+# number of columns. The competing causes are, Cassandra has to
+# deserialize this much of the row to read a single column, so you want
+# it to be small - at least if you do many partial-row reads - but all
+# the index data is read for each access, so you don't want to generate
+# that wastefully either.
+column_index_size_in_kb: 64
+
+# Size limit for rows being compacted in memory. Larger rows will spill
+# over to disk and use a slower two-pass compaction process. A message
+# will be logged specifying the row key.
+in_memory_compaction_limit_in_mb: 64
+
+# Number of simultaneous compactions to allow, NOT including
+# validation "compactions" for anti-entropy repair. Simultaneous
+# compactions can help preserve read performance in a mixed read/write
+# workload, by mitigating the tendency of small sstables to accumulate
+# during a single long running compactions. The default is usually
+# fine and if you experience problems with compaction running too
+# slowly or too fast, you should look at
+# compaction_throughput_mb_per_sec first.
+#
+# concurrent_compactors defaults to the number of cores.
+# Uncomment to make compaction mono-threaded, the pre-0.8 default.
+#concurrent_compactors: 1
+
+# Multi-threaded compaction. When enabled, each compaction will use
+# up to one thread per core, plus one thread per sstable being merged.
+# This is usually only useful for SSD-based hardware: otherwise,
+# your concern is usually to get compaction to do LESS i/o (see:
+# compaction_throughput_mb_per_sec), not more.
+multithreaded_compaction: false
+
+# Throttles compaction to the given total throughput across the entire
+# system. The faster you insert data, the faster you need to compact in
+# order to keep the sstable count down, but in general, setting this to
+# 16 to 32 times the rate you are inserting data is more than sufficient.
+# Setting this to 0 disables throttling. Note that this account for all types
+# of compaction, including validation compaction.
+compaction_throughput_mb_per_sec: 16
+
+# Track cached row keys during compaction, and re-cache their new
+# positions in the compacted sstable. Disable if you use really large
+# key caches.
+compaction_preheat_key_cache: true
+
+# Throttles all outbound streaming file transfers on this node to the
+# given total throughput in Mbps. This is necessary because Cassandra does
+# mostly sequential IO when streaming data during bootstrap or repair, which
+# can lead to saturating the network connection and degrading rpc performance.
+# When unset, the default is 400 Mbps or 50 MB/s.
+# stream_throughput_outbound_megabits_per_sec: 400
+
+# How long the coordinator should wait for read operations to complete
+read_request_timeout_in_ms: 10000
+# How long the coordinator should wait for seq or index scans to complete
+range_request_timeout_in_ms: 10000
+# How long the coordinator should wait for writes to complete
+write_request_timeout_in_ms: 10000
+# How long the coordinator should wait for truncates to complete
+# (This can be much longer, because unless auto_snapshot is disabled
+# we need to flush first so we can snapshot before removing the data.)
+truncate_request_timeout_in_ms: 60000
+# The default timeout for other, miscellaneous operations
+request_timeout_in_ms: 10000
+
+# Enable operation timeout information exchange between nodes to accurately
+# measure request timeouts, If disabled cassandra will assuming the request
+# was forwarded to the replica instantly by the coordinator
+#
+# Warning: before enabling this property make sure to ntp is installed
+# and the times are synchronized between the nodes.
+cross_node_timeout: false
+
+# Enable socket timeout for streaming operation.
+# When a timeout occurs during streaming, streaming is retried from the start
+# of the current file. This *can* involve re-streaming an important amount of
+# data, so you should avoid setting the value too low.
+# Default value is 0, which never timeout streams.
+# streaming_socket_timeout_in_ms: 0
+
+# phi value that must be reached for a host to be marked down.
+# most users should never need to adjust this.
+# phi_convict_threshold: 8
+
+# endpoint_snitch -- Set this to a class that implements
+# IEndpointSnitch. The snitch has two functions:
+# - it teaches Cassandra enough about your network topology to route
+# requests efficiently
+# - it allows Cassandra to spread replicas around your cluster to avoid
+# correlated failures. It does this by grouping machines into
+# "datacenters" and "racks." Cassandra will do its best not to have
+# more than one replica on the same "rack" (which may not actually
+# be a physical location)
+#
+# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
+# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
+# ARE PLACED.
+#
+# Out of the box, Cassandra provides
+# - SimpleSnitch:
+# Treats Strategy order as proximity. This improves cache locality
+# when disabling read repair, which can further improve throughput.
+# Only appropriate for single-datacenter deployments.
+# - PropertyFileSnitch:
+# Proximity is determined by rack and data center, which are
+# explicitly configured in cassandra-topology.properties.
+# - GossipingPropertyFileSnitch
+# The rack and datacenter for the local node are defined in
+# cassandra-rackdc.properties and propagated to other nodes via gossip. If
+# cassandra-topology.properties exists, it is used as a fallback, allowing
+# migration from the PropertyFileSnitch.
+# - RackInferringSnitch:
+# Proximity is determined by rack and data center, which are
+# assumed to correspond to the 3rd and 2nd octet of each node's
+# IP address, respectively. Unless this happens to match your
+# deployment conventions (as it did Facebook's), this is best used
+# as an example of writing a custom Snitch class.
+# - Ec2Snitch:
+# Appropriate for EC2 deployments in a single Region. Loads Region
+# and Availability Zone information from the EC2 API. The Region is
+# treated as the Datacenter, and the Availability Zone as the rack.
+# Only private IPs are used, so this will not work across multiple
+# Regions.
+# - Ec2MultiRegionSnitch:
+# Uses public IPs as broadcast_address to allow cross-region
+# connectivity. (Thus, you should set seed addresses to the public
+# IP as well.) You will need to open the storage_port or
+# ssl_storage_port on the public IP firewall. (For intra-Region
+# traffic, Cassandra will switch to the private IP after
+# establishing a connection.)
+#
+# You can use a custom Snitch by setting this to the full class name
+# of the snitch, which will be assumed to be on your classpath.
+endpoint_snitch: SimpleSnitch
+
+# controls how often to perform the more expensive part of host score
+# calculation
+dynamic_snitch_update_interval_in_ms: 100
+# controls how often to reset all host scores, allowing a bad host to
+# possibly recover
+dynamic_snitch_reset_interval_in_ms: 600000
+# if set greater than zero and read_repair_chance is < 1.0, this will allow
+# 'pinning' of replicas to hosts in order to increase cache capacity.
+# The badness threshold will control how much worse the pinned host has to be
+# before the dynamic snitch will prefer other replicas over it. This is
+# expressed as a double which represents a percentage. Thus, a value of
+# 0.2 means Cassandra would continue to prefer the static snitch values
+# until the pinned host was 20% worse than the fastest.
+dynamic_snitch_badness_threshold: 0.1
+
+# request_scheduler -- Set this to a class that implements
+# RequestScheduler, which will schedule incoming client requests
+# according to the specific policy. This is useful for multi-tenancy
+# with a single Cassandra cluster.
+# NOTE: This is specifically for requests from the client and does
+# not affect inter node communication.
+# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
+# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
+# client requests to a node with a separate queue for each
+# request_scheduler_id. The scheduler is further customized by
+# request_scheduler_options as described below.
+request_scheduler: org.apache.cassandra.scheduler.NoScheduler
+
+# Scheduler Options vary based on the type of scheduler
+# NoScheduler - Has no options
+# RoundRobin
+# - throttle_limit -- The throttle_limit is the number of in-flight
+# requests per client. Requests beyond
+# that limit are queued up until
+# running requests can complete.
+# The value of 80 here is twice the number of
+# concurrent_reads + concurrent_writes.
+# - default_weight -- default_weight is optional and allows for
+# overriding the default which is 1.
+# - weights -- Weights are optional and will default to 1 or the
+# overridden default_weight. The weight translates into how
+# many requests are handled during each turn of the
+# RoundRobin, based on the scheduler id.
+#
+# request_scheduler_options:
+# throttle_limit: 80
+# default_weight: 5
+# weights:
+# Keyspace1: 1
+# Keyspace2: 5
+
+# request_scheduler_id -- An identifer based on which to perform
+# the request scheduling. Currently the only valid option is keyspace.
+# request_scheduler_id: keyspace
+
+# index_interval controls the sampling of entries from the primrary
+# row index in terms of space versus time. The larger the interval,
+# the smaller and less effective the sampling will be. In technicial
+# terms, the interval coresponds to the number of index entries that
+# are skipped between taking each sample. All the sampled entries
+# must fit in memory. Generally, a value between 128 and 512 here
+# coupled with a large key cache size on CFs results in the best trade
+# offs. This value is not often changed, however if you have many
+# very small rows (many to an OS page), then increasing this will
+# often lower memory usage without a impact on performance.
+index_interval: 128
+
+# Enable or disable inter-node encryption
+# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
+# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
+# suite for authentication, key exchange and encryption of the actual data transfers.
+# NOTE: No custom encryption options are enabled at the moment
+# The available internode options are : all, none, dc, rack
+#
+# If set to dc cassandra will encrypt the traffic between the DCs
+# If set to rack cassandra will encrypt the traffic between the racks
+#
+# The passwords used in these options must match the passwords used when generating
+# the keystore and truststore. For instructions on generating these files, see:
+# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
+#
+server_encryption_options:
+ internode_encryption: none
+ keystore: conf/.keystore
+ keystore_password: cassandra
+ truststore: conf/.truststore
+ truststore_password: cassandra
+ # More advanced defaults below:
+ # protocol: TLS
+ # algorithm: SunX509
+ # store_type: JKS
+ # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
+
+# enable or disable client/server encryption.
+client_encryption_options:
+ enabled: false
+ keystore: conf/.keystore
+ keystore_password: cassandra
+ # More advanced defaults below:
+ # protocol: TLS
+ # algorithm: SunX509
+ # store_type: JKS
+ # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
+
+# internode_compression controls whether traffic between nodes is
+# compressed.
+# can be: all - all traffic is compressed
+# dc - traffic between different datacenters is compressed
+# none - nothing is compressed.
+internode_compression: all
44 conf/1.2/log4j-server.properties
View
@@ -0,0 +1,44 @@
+# 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.
+
+# for production, you should probably set pattern to %c instead of %l.
+# (%l is slower.)
+
+# output messages into a rolling log file as well as stdout
+log4j.rootLogger=INFO,stdout,R
+
+# stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
+
+# rolling log file
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.maxFileSize=20MB
+log4j.appender.R.maxBackupIndex=50
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
+# Edit the next line to point to your logs directory
+log4j.appender.R.File=/var/log/cassandra/system.log
+
+# Application logging options
+#log4j.logger.org.apache.cassandra=DEBUG
+#log4j.logger.org.apache.cassandra.db=DEBUG
+#log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG
+
+# Adding this to avoid thrift logging disconnect errors.
+log4j.logger.org.apache.thrift.server.TNonblockingServer=ERROR
+
72 conf/1.2/schema.json
View
@@ -0,0 +1,72 @@
+{"Twitter":{
+ "Users":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard"},
+ "UserAudits":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard"},
+ "UserCounters":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard",
+ "default_validation_class":"CounterColumnType"},
+ "UserCounterAggregates":{
+ "subcomparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Super",
+ "default_validation_class":"CounterColumnType"},
+ "UserRelationships":{
+ "subcomparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Super"},
+ "Usernames":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard"},
+ "Statuses":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard"},
+ "StatusAudits":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Standard"},
+ "StatusRelationships":{
+ "subcomparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Super"},
+ "Indexes":{
+ "comparator_type":"org.apache.cassandra.db.marshal.UTF8Type",
+ "column_type":"Super"},
+ "TimelinishThings":{
+ "comparator_type":"org.apache.cassandra.db.marshal.BytesType",
+ "column_type":"Standard"}
+ },
+"Multiblog":{
+ "Blogs":{
+ "comparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "column_type":"Standard"},
+ "Comments":{
+ "comparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "column_type":"Standard"}
+ },
+"MultiblogLong":{
+ "Blogs":{
+ "comparator_type":"org.apache.cassandra.db.marshal.LongType",
+ "column_type":"Standard"},
+ "Comments":{
+ "comparator_type":"org.apache.cassandra.db.marshal.LongType",
+ "column_type":"Standard"}
+ },
+"TypeConversions":{
+ "UUIDColumnConversion":{
+ "comparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "column_type":"Standard"},
+ "SuperUUID":{
+ "subcomparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "comparator_type":"org.apache.cassandra.db.marshal.TimeUUIDType",
+ "column_type":"Super"},
+ "CompositeColumnConversion":{
+ "comparator_type":"org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.IntegerType,org.apache.cassandra.db.marshal.UTF8Type)",
+ "column_type":"Standard"},
+ "DynamicComposite":{
+ "comparator_type":"org.apache.cassandra.db.marshal.DynamicCompositeType(u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,b=>org.apache.cassandra.db.marshal.BytesType,a=>org.apache.cassandra.db.marshal.AsciiType,l=>org.apache.cassandra.db.marshal.LongType,x=>org.apache.cassandra.db.marshal.LexicalUUIDType,i=>org.apache.cassandra.db.marshal.IntegerType)",
+ "column_type":"Standard"}
+ }
+}
57 conf/1.2/schema.txt
View
@@ -0,0 +1,57 @@
+create keyspace Twitter with
+ placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' AND
+ strategy_options = {replication_factor:1};
+use Twitter;
+create column family Users with comparator = 'UTF8Type';
+create column family UserAudits with comparator = 'UTF8Type';
+create column family UserCounters with comparator = 'UTF8Type' and
+ default_validation_class = CounterColumnType;
+create column family UserCounterAggregates with column_type = 'Super'
+ and comparator = 'UTF8Type' and
+ subcomparator = 'UTF8Type' and
+ default_validation_class = CounterColumnType;
+create column family UserRelationships with
+ comparator = 'UTF8Type' and
+ column_type = 'Super' and
+ subcomparator = 'TimeUUIDType';
+create column family Usernames with comparator = 'UTF8Type';
+create column family Statuses
+ with comparator = 'UTF8Type'
+ and column_metadata = [
+ {column_name: 'tags', validation_class: 'BytesType', index_type: 'KEYS'}
+ ];
+create column family StatusAudits with comparator = 'UTF8Type';
+create column family StatusRelationships with
+ comparator = 'UTF8Type' and
+ column_type = 'Super' and
+ subcomparator = 'TimeUUIDType';
+create column family Indexes with
+ comparator = 'UTF8Type' and
+ column_type = 'Super';
+create column family TimelinishThings with
+ comparator = 'BytesType';
+
+create keyspace Multiblog with
+ placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' AND
+ strategy_options = {replication_factor:1};
+use Multiblog;
+create column family Blogs with comparator = 'TimeUUIDType';
+create column family Comments with comparator = 'TimeUUIDType';
+
+
+create keyspace MultiblogLong with
+ placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' AND
+ strategy_options = {replication_factor:1};
+use MultiblogLong;
+create column family Blogs with comparator = 'LongType';
+create column family Comments with comparator = 'LongType';
+
+create keyspace TypeConversions with
+ placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' AND
+ strategy_options = {replication_factor:1};
+use TypeConversions;
+create column family UUIDColumnConversion with comparator = TimeUUIDType;
+create column family SuperUUID with comparator = TimeUUIDType and column_type = Super;
+create column family CompositeColumnConversion with comparator = 'CompositeType(IntegerType, UTF8Type)';
+create column family DynamicComposite with comparator ='DynamicCompositeType
+ (a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType,t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType)';
7 lib/cassandra/1.2.rb
View
@@ -0,0 +1,7 @@
+class Cassandra
+ def self.VERSION
+ "1.2"
+ end
+end
+
+require "#{File.expand_path(File.dirname(__FILE__))}/../cassandra"
1  lib/cassandra/1.2/cassandra.rb
View
@@ -0,0 +1 @@
+require "#{File.expand_path(File.dirname(__FILE__))}/../1.1/cassandra"
1  lib/cassandra/1.2/columns.rb
View
@@ -0,0 +1 @@
+require "#{File.expand_path(File.dirname(__FILE__))}/../1.1/columns"
1  lib/cassandra/1.2/protocol.rb
View
@@ -0,0 +1 @@
+require "#{File.expand_path(File.dirname(__FILE__))}/../1.1/protocol"
3,013 vendor/1.2/gen-rb/cassandra.rb
View
3,013 additions, 0 deletions not shown
13 vendor/1.2/gen-rb/cassandra_constants.rb
View
@@ -0,0 +1,13 @@
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift'
+require 'cassandra_types'
+
+module CassandraThrift
+ VERSION = %q"19.35.0"
+
+end
965 vendor/1.2/gen-rb/cassandra_types.rb
View
@@ -0,0 +1,965 @@
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift'
+
+module CassandraThrift
+ module ConsistencyLevel
+ ONE = 1
+ QUORUM = 2
+ LOCAL_QUORUM = 3
+ EACH_QUORUM = 4
+ ALL = 5
+ ANY = 6
+ TWO = 7
+ THREE = 8
+ VALUE_MAP = {1 => "ONE", 2 => "QUORUM", 3 => "LOCAL_QUORUM", 4 => "EACH_QUORUM", 5 => "ALL", 6 => "ANY", 7 => "TWO", 8 => "THREE"}
+ VALID_VALUES = Set.new([ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, ANY, TWO, THREE]).freeze
+ end
+
+ module IndexOperator
+ EQ = 0
+ GTE = 1
+ GT = 2
+ LTE = 3
+ LT = 4
+ VALUE_MAP = {0 => "EQ", 1 => "GTE", 2 => "GT", 3 => "LTE", 4 => "LT"}
+ VALID_VALUES = Set.new([EQ, GTE, GT, LTE, LT]).freeze
+ end
+
+ module IndexType
+ KEYS = 0
+ CUSTOM = 1
+ COMPOSITES = 2
+ VALUE_MAP = {0 => "KEYS", 1 => "CUSTOM", 2 => "COMPOSITES"}
+ VALID_VALUES = Set.new([KEYS, CUSTOM, COMPOSITES]).freeze
+ end
+
+ module Compression
+ GZIP = 1
+ NONE = 2
+ VALUE_MAP = {1 => "GZIP", 2 => "NONE"}
+ VALID_VALUES = Set.new([GZIP, NONE]).freeze
+ end
+
+ module CqlResultType
+ ROWS = 1
+ VOID = 2
+ INT = 3
+ VALUE_MAP = {1 => "ROWS", 2 => "VOID", 3 => "INT"}
+ VALID_VALUES = Set.new([ROWS, VOID, INT]).freeze
+ end
+
+ # Basic unit of data within a ColumnFamily.
+# @param name, the name by which this column is set and retrieved. Maximum 64KB long.
+# @param value. The data associated with the name. Maximum 2GB long, but in practice you should limit it to small numbers of MB (since Thrift must read the full value into memory to operate on it).
+# @param timestamp. The timestamp is used for conflict detection/resolution when two columns with same name need to be compared.
+# @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted.
+ class Column
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ VALUE = 2
+ TIMESTAMP = 3
+ TTL = 4
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true, :optional => true},
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
+ TTL => {:type => ::Thrift::Types::I32, :name => 'ttl', :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A named list of columns.
+# @param name. see Column.name.
+# @param columns. A collection of standard Columns. The columns within a super column are defined in an adhoc manner.
+# Columns within a super column do not have to have matching structures (similarly named child columns).
+ class SuperColumn
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ COLUMNS = 2
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::Column}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CounterColumn
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ VALUE = 2
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
+ VALUE => {:type => ::Thrift::Types::I64, :name => 'value'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CounterSuperColumn
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ COLUMNS = 2
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CounterColumn}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Methods for fetching rows/records from Cassandra will return either a single instance of ColumnOrSuperColumn or a list
+# of ColumnOrSuperColumns (get_slice()). If you're looking up a SuperColumn (or list of SuperColumns) then the resulting
+# instances of ColumnOrSuperColumn will have the requested SuperColumn in the attribute super_column. For queries resulting
+# in Columns, those values will be in the attribute column. This change was made between 0.3 and 0.4 to standardize on
+# single query methods that may return either a SuperColumn or Column.
+#
+# If the query was on a counter column family, you will either get a counter_column (instead of a column) or a
+# counter_super_column (instead of a super_column)
+#
+# @param column. The Column returned by get() or get_slice().
+# @param super_column. The SuperColumn returned by get() or get_slice().
+# @param counter_column. The Counterolumn returned by get() or get_slice().
+# @param counter_super_column. The CounterSuperColumn returned by get() or get_slice().
+ class ColumnOrSuperColumn
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN = 1
+ SUPER_COLUMN = 2
+ COUNTER_COLUMN = 3
+ COUNTER_SUPER_COLUMN = 4
+
+ FIELDS = {
+ COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => ::CassandraThrift::Column, :optional => true},
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => ::CassandraThrift::SuperColumn, :optional => true},
+ COUNTER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'counter_column', :class => ::CassandraThrift::CounterColumn, :optional => true},
+ COUNTER_SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'counter_super_column', :class => ::CassandraThrift::CounterSuperColumn, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A specific column was requested that does not exist.
+ class NotFoundException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
+# why contains an associated error message.
+ class InvalidRequestException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ def initialize(message=nil)
+ super()
+ self.why = message
+ end
+
+ def message; why end
+
+ WHY = 1
+
+ FIELDS = {
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Not all the replicas required could be created and/or read.
+ class UnavailableException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
+ class TimedOutException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ ACKNOWLEDGED_BY = 1
+ ACKNOWLEDGED_BY_BATCHLOG = 2
+
+ FIELDS = {
+ # if a write operation was acknowledged by some replicas but not by enough to
+# satisfy the required ConsistencyLevel, the number of successful
+# replies will be given here. In case of atomic_batch_mutate method this field
+# will be set to -1 if the batch was written to the batchlog and to 0 if it wasn't.
+ ACKNOWLEDGED_BY => {:type => ::Thrift::Types::I32, :name => 'acknowledged_by', :optional => true},
+ # in case of atomic_batch_mutate method this field tells if the batch was written to the batchlog.
+ ACKNOWLEDGED_BY_BATCHLOG => {:type => ::Thrift::Types::BOOL, :name => 'acknowledged_by_batchlog', :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
+ class AuthenticationException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ def initialize(message=nil)
+ super()
+ self.why = message
+ end
+
+ def message; why end
+
+ WHY = 1
+
+ FIELDS = {
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # invalid authorization request (user does not have access to keyspace)
+ class AuthorizationException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ def initialize(message=nil)
+ super()
+ self.why = message
+ end
+
+ def message; why end
+
+ WHY = 1
+
+ FIELDS = {
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # NOTE: This up outdated exception left for backward compatibility reasons,
+# no actual schema agreement validation is done starting from Cassandra 1.2
+#
+# schemas are not in agreement across all nodes
+ class SchemaDisagreementException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # ColumnParent is used when selecting groups of columns from the same ColumnFamily. In directory structure terms, imagine
+# ColumnParent as ColumnPath + '/../'.
+#
+# See also <a href="cassandra.html#Struct_ColumnPath">ColumnPath</a>
+ class ColumnParent
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN_FAMILY = 3
+ SUPER_COLUMN = 4
+
+ FIELDS = {
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # The ColumnPath is the path to a single column in Cassandra. It might make sense to think of ColumnPath and
+# ColumnParent in terms of a directory structure.
+#
+# ColumnPath is used to looking up a single column.
+#
+# @param column_family. The name of the CF of the column being looked up.
+# @param super_column. The super column name.
+# @param column. The column name.
+ class ColumnPath
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN_FAMILY = 3
+ SUPER_COLUMN = 4
+ COLUMN = 5
+
+ FIELDS = {
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
+ COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A slice range is a structure that stores basic range, ordering and limit information for a query that will return
+# multiple columns. It could be thought of as Cassandra's version of LIMIT and ORDER BY
+#
+# @param start. The column name to start the slice with. This attribute is not required, though there is no default value,
+# and can be safely set to '', i.e., an empty byte array, to start with the first column name. Otherwise, it
+# must a valid value under the rules of the Comparator defined for the given ColumnFamily.
+# @param finish. The column name to stop the slice at. This attribute is not required, though there is no default value,
+# and can be safely set to an empty byte array to not stop until 'count' results are seen. Otherwise, it
+# must also be a valid value to the ColumnFamily Comparator.
+# @param reversed. Whether the results should be ordered in reversed order. Similar to ORDER BY blah DESC in SQL.
+# @param count. How many columns to return. Similar to LIMIT in SQL. May be arbitrarily large, but Thrift will
+# materialize the whole result into memory before returning it to the client, so be aware that you may
+# be better served by iterating through slices by passing the last value of one call in as the 'start'
+# of the next instead of increasing 'count' arbitrarily large.
+ class SliceRange
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ START = 1
+ FINISH = 2
+ REVERSED = 3
+ COUNT = 4
+
+ FIELDS = {
+ START => {:type => ::Thrift::Types::STRING, :name => 'start', :binary => true},
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish', :binary => true},
+ REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish is unset!') unless @finish
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field reversed is unset!') if @reversed.nil?
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A SlicePredicate is similar to a mathematic predicate (see http://en.wikipedia.org/wiki/Predicate_(mathematical_logic)),
+# which is described as "a property that the elements of a set have in common."
+#
+# SlicePredicate's in Cassandra are described with either a list of column_names or a SliceRange. If column_names is
+# specified, slice_range is ignored.
+#
+# @param column_name. A list of column names to retrieve. This can be used similar to Memcached's "multi-get" feature
+# to fetch N known column names. For instance, if you know you wish to fetch columns 'Joe', 'Jack',
+# and 'Jim' you can pass those column names as a list to fetch all three at once.
+# @param slice_range. A SliceRange describing how to range, order, and/or limit the slice.
+ class SlicePredicate
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN_NAMES = 1
+ SLICE_RANGE = 2
+
+ FIELDS = {
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
+ SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => ::CassandraThrift::SliceRange, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class IndexExpression
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN_NAME = 1
+ OP = 2
+ VALUE = 3
+
+ FIELDS = {
+ COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name', :binary => true},
+ OP => {:type => ::Thrift::Types::I32, :name => 'op', :enum_class => ::CassandraThrift::IndexOperator},
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_name is unset!') unless @column_name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
+ unless @op.nil? || ::CassandraThrift::IndexOperator::VALID_VALUES.include?(@op)
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
+ end
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # @deprecated use a KeyRange with row_filter in get_range_slices instead
+ class IndexClause
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ EXPRESSIONS = 1
+ START_KEY = 2
+ COUNT = 3
+
+ FIELDS = {
+ EXPRESSIONS => {:type => ::Thrift::Types::LIST, :name => 'expressions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::IndexExpression}},
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true},
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expressions is unset!') unless @expressions
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_key is unset!') unless @start_key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # The semantics of start keys and tokens are slightly different.
+# Keys are start-inclusive; tokens are start-exclusive. Token
+# ranges may also wrap -- that is, the end token may be less
+# than the start one. Thus, a range from keyX to keyX is a
+# one-element range, but a range from tokenY to tokenY is the
+# full ring.
+ class KeyRange
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ START_KEY = 1
+ END_KEY = 2
+ START_TOKEN = 3
+ END_TOKEN = 4
+ ROW_FILTER = 6
+ COUNT = 5
+
+ FIELDS = {
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true, :optional => true},
+ END_KEY => {:type => ::Thrift::Types::STRING, :name => 'end_key', :binary => true, :optional => true},
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token', :optional => true},
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token', :optional => true},
+ ROW_FILTER => {:type => ::Thrift::Types::LIST, :name => 'row_filter', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::IndexExpression}, :optional => true},
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A KeySlice is key followed by the data it maps to. A collection of KeySlice is returned by the get_range_slice operation.
+#
+# @param key. a row key
+# @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
+# a SlicePredicate.
+ class KeySlice
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ KEY = 1
+ COLUMNS = 2
+
+ FIELDS = {
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::ColumnOrSuperColumn}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class KeyCount
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ KEY = 1
+ COUNT = 2
+
+ FIELDS = {
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Note that the timestamp is only optional in case of counter deletion.
+ class Deletion
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TIMESTAMP = 1
+ SUPER_COLUMN = 2
+ PREDICATE = 3
+
+ FIELDS = {
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => ::CassandraThrift::SlicePredicate, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A Mutation is either an insert (represented by filling column_or_supercolumn) or a deletion (represented by filling the deletion attribute).
+# @param column_or_supercolumn. An insert to a column or supercolumn (possibly counter column or supercolumn)
+# @param deletion. A deletion of a column or supercolumn
+ class Mutation
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLUMN_OR_SUPERCOLUMN = 1
+ DELETION = 2
+
+ FIELDS = {
+ COLUMN_OR_SUPERCOLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column_or_supercolumn', :class => ::CassandraThrift::ColumnOrSuperColumn, :optional => true},
+ DELETION => {:type => ::Thrift::Types::STRUCT, :name => 'deletion', :class => ::CassandraThrift::Deletion, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class EndpointDetails
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ HOST = 1
+ DATACENTER = 2
+ RACK = 3
+
+ FIELDS = {
+ HOST => {:type => ::Thrift::Types::STRING, :name => 'host'},
+ DATACENTER => {:type => ::Thrift::Types::STRING, :name => 'datacenter'},
+ RACK => {:type => ::Thrift::Types::STRING, :name => 'rack', :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # A TokenRange describes part of the Cassandra ring, it is a mapping from a range to
+# endpoints responsible for that range.
+# @param start_token The first token in the range
+# @param end_token The last token in the range
+# @param endpoints The endpoints responsible for the range (listed by their configured listen_address)
+# @param rpc_endpoints The endpoints responsible for the range (listed by their configured rpc_address)
+ class TokenRange
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ START_TOKEN = 1
+ END_TOKEN = 2
+ ENDPOINTS = 3
+ RPC_ENDPOINTS = 4
+ ENDPOINT_DETAILS = 5
+
+ FIELDS = {
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
+ ENDPOINTS => {:type => ::Thrift::Types::LIST, :name => 'endpoints', :element => {:type => ::Thrift::Types::STRING}},
+ RPC_ENDPOINTS => {:type => ::Thrift::Types::LIST, :name => 'rpc_endpoints', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
+ ENDPOINT_DETAILS => {:type => ::Thrift::Types::LIST, :name => 'endpoint_details', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::EndpointDetails}, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field endpoints is unset!') unless @endpoints
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Authentication requests can contain any data, dependent on the IAuthenticator used
+ class AuthenticationRequest
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ CREDENTIALS = 1
+
+ FIELDS = {
+ CREDENTIALS => {:type => ::Thrift::Types::MAP, :name => 'credentials', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field credentials is unset!') unless @credentials
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class ColumnDef
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ VALIDATION_CLASS = 2
+ INDEX_TYPE = 3
+ INDEX_NAME = 4
+ INDEX_OPTIONS = 5
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
+ VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'validation_class'},
+ INDEX_TYPE => {:type => ::Thrift::Types::I32, :name => 'index_type', :optional => true, :enum_class => ::CassandraThrift::IndexType},
+ INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name', :optional => true},
+ INDEX_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'index_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field validation_class is unset!') unless @validation_class
+ unless @index_type.nil? || ::CassandraThrift::IndexType::VALID_VALUES.include?(@index_type)
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field index_type!')
+ end
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CfDef
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ KEYSPACE = 1
+ NAME = 2
+ COLUMN_TYPE = 3
+ COMPARATOR_TYPE = 5
+ SUBCOMPARATOR_TYPE = 6
+ COMMENT = 8
+ READ_REPAIR_CHANCE = 12
+ COLUMN_METADATA = 13
+ GC_GRACE_SECONDS = 14
+ DEFAULT_VALIDATION_CLASS = 15
+ ID = 16
+ MIN_COMPACTION_THRESHOLD = 17
+ MAX_COMPACTION_THRESHOLD = 18
+ REPLICATE_ON_WRITE = 24
+ KEY_VALIDATION_CLASS = 26
+ KEY_ALIAS = 28
+ COMPACTION_STRATEGY = 29
+ COMPACTION_STRATEGY_OPTIONS = 30
+ COMPRESSION_OPTIONS = 32
+ BLOOM_FILTER_FP_CHANCE = 33
+ CACHING = 34
+ DCLOCAL_READ_REPAIR_CHANCE = 37
+ ROW_CACHE_SIZE = 9
+ KEY_CACHE_SIZE = 11
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS = 19
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS = 20
+ MEMTABLE_FLUSH_AFTER_MINS = 21
+ MEMTABLE_THROUGHPUT_IN_MB = 22
+ MEMTABLE_OPERATIONS_IN_MILLIONS = 23
+ MERGE_SHARDS_CHANCE = 25
+ ROW_CACHE_PROVIDER = 27
+ ROW_CACHE_KEYS_TO_SAVE = 31
+
+ FIELDS = {
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
+ COLUMN_TYPE => {:type => ::Thrift::Types::STRING, :name => 'column_type', :default => %q"Standard", :optional => true},
+ COMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'comparator_type', :default => %q"BytesType", :optional => true},
+ SUBCOMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'subcomparator_type', :optional => true},
+ COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment', :optional => true},
+ READ_REPAIR_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'read_repair_chance', :optional => true},
+ COLUMN_METADATA => {:type => ::Thrift::Types::LIST, :name => 'column_metadata', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::ColumnDef}, :optional => true},
+ GC_GRACE_SECONDS => {:type => ::Thrift::Types::I32, :name => 'gc_grace_seconds', :optional => true},
+ DEFAULT_VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'default_validation_class', :optional => true},
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
+ MIN_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'min_compaction_threshold', :optional => true},
+ MAX_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'max_compaction_threshold', :optional => true},
+ REPLICATE_ON_WRITE => {:type => ::Thrift::Types::BOOL, :name => 'replicate_on_write', :optional => true},
+ KEY_VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'key_validation_class', :optional => true},
+ KEY_ALIAS => {:type => ::Thrift::Types::STRING, :name => 'key_alias', :binary => true, :optional => true},
+ COMPACTION_STRATEGY => {:type => ::Thrift::Types::STRING, :name => 'compaction_strategy', :optional => true},
+ COMPACTION_STRATEGY_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'compaction_strategy_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
+ COMPRESSION_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'compression_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
+ BLOOM_FILTER_FP_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'bloom_filter_fp_chance', :optional => true},
+ CACHING => {:type => ::Thrift::Types::STRING, :name => 'caching', :default => %q"keys_only", :optional => true},
+ DCLOCAL_READ_REPAIR_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'dclocal_read_repair_chance', :default => 0, :optional => true},
+ # @deprecated
+ ROW_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'row_cache_size', :optional => true},
+ # @deprecated
+ KEY_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'key_cache_size', :optional => true},
+ # @deprecated
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'row_cache_save_period_in_seconds', :optional => true},
+ # @deprecated
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'key_cache_save_period_in_seconds', :optional => true},
+ # @deprecated
+ MEMTABLE_FLUSH_AFTER_MINS => {:type => ::Thrift::Types::I32, :name => 'memtable_flush_after_mins', :optional => true},
+ # @deprecated
+ MEMTABLE_THROUGHPUT_IN_MB => {:type => ::Thrift::Types::I32, :name => 'memtable_throughput_in_mb', :optional => true},
+ # @deprecated
+ MEMTABLE_OPERATIONS_IN_MILLIONS => {:type => ::Thrift::Types::DOUBLE, :name => 'memtable_operations_in_millions', :optional => true},
+ # @deprecated
+ MERGE_SHARDS_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'merge_shards_chance', :optional => true},
+ # @deprecated
+ ROW_CACHE_PROVIDER => {:type => ::Thrift::Types::STRING, :name => 'row_cache_provider', :optional => true},
+ # @deprecated
+ ROW_CACHE_KEYS_TO_SAVE => {:type => ::Thrift::Types::I32, :name => 'row_cache_keys_to_save', :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class KsDef
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME = 1
+ STRATEGY_CLASS = 2
+ STRATEGY_OPTIONS = 3
+ REPLICATION_FACTOR = 4
+ CF_DEFS = 5
+ DURABLE_WRITES = 6
+
+ FIELDS = {
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
+ STRATEGY_CLASS => {:type => ::Thrift::Types::STRING, :name => 'strategy_class'},
+ STRATEGY_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'strategy_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
+ # @deprecated ignored
+ REPLICATION_FACTOR => {:type => ::Thrift::Types::I32, :name => 'replication_factor', :optional => true},
+ CF_DEFS => {:type => ::Thrift::Types::LIST, :name => 'cf_defs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CfDef}},
+ DURABLE_WRITES => {:type => ::Thrift::Types::BOOL, :name => 'durable_writes', :default => true, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field strategy_class is unset!') unless @strategy_class
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cf_defs is unset!') unless @cf_defs
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Row returned from a CQL query
+ class CqlRow
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ KEY = 1
+ COLUMNS = 2
+
+ FIELDS = {
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::Column}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CqlMetadata
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NAME_TYPES = 1
+ VALUE_TYPES = 2
+ DEFAULT_NAME_TYPE = 3
+ DEFAULT_VALUE_TYPE = 4
+
+ FIELDS = {
+ NAME_TYPES => {:type => ::Thrift::Types::MAP, :name => 'name_types', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING}},
+ VALUE_TYPES => {:type => ::Thrift::Types::MAP, :name => 'value_types', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING}},
+ DEFAULT_NAME_TYPE => {:type => ::Thrift::Types::STRING, :name => 'default_name_type'},
+ DEFAULT_VALUE_TYPE => {:type => ::Thrift::Types::STRING, :name => 'default_value_type'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name_types is unset!') unless @name_types
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value_types is unset!') unless @value_types
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field default_name_type is unset!') unless @default_name_type
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field default_value_type is unset!') unless @default_value_type
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CqlResult
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TYPE = 1
+ ROWS = 2
+ NUM = 3
+ SCHEMA = 4
+
+ FIELDS = {
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CassandraThrift::CqlResultType},
+ ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CqlRow}, :optional => true},
+ NUM => {:type => ::Thrift::Types::I32, :name => 'num', :optional => true},
+ SCHEMA => {:type => ::Thrift::Types::STRUCT, :name => 'schema', :class => ::CassandraThrift::CqlMetadata, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
+ unless @type.nil? || ::CassandraThrift::CqlResultType::VALID_VALUES.include?(@type)
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
+ end
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class CqlPreparedResult
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ ITEMID = 1
+ COUNT = 2
+ VARIABLE_TYPES = 3
+ VARIABLE_NAMES = 4
+
+ FIELDS = {
+ ITEMID => {:type => ::Thrift::Types::I32, :name => 'itemId'},
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
+ VARIABLE_TYPES => {:type => ::Thrift::Types::LIST, :name => 'variable_types', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
+ VARIABLE_NAMES => {:type => ::Thrift::Types::LIST, :name => 'variable_names', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field itemId is unset!') unless @itemId
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ # Represents input splits used by hadoop ColumnFamilyRecordReaders
+ class CfSplit
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ START_TOKEN = 1
+ END_TOKEN = 2
+ ROW_COUNT = 3
+
+ FIELDS = {
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
+ ROW_COUNT => {:type => ::Thrift::Types::I64, :name => 'row_count'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_count is unset!') unless @row_count
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+end

No commit comments for this range

Something went wrong with that request. Please try again.