Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated for Cassanderl 0.7-dev

  • Loading branch information...
commit ab0bca2effad7d6bb12587ddd49574a03d26cbd0 1 parent 8eca740
@lpgauth authored
View
324 LICENSE
@@ -0,0 +1,324 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+--------------------------------------------------
+SOFTWARE DISTRIBUTED WITH THRIFT:
+
+The Apache Thrift software includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses.
+
+--------------------------------------------------
+Portions of the following files are licensed under the MIT License:
+
+ lib/erl/src/Makefile.am
+
+Please see doc/otp-base-license.txt for the full terms of this license.
+
+
+--------------------------------------------------
+The following files contain some portions of code contributed under
+the Thrift Software License (see doc/old-thrift-license.txt), and relicensed
+under the Apache 2.0 License:
+
+ compiler/cpp/Makefile.am
+ compiler/cpp/src/generate/t_cocoa_generator.cc
+ compiler/cpp/src/generate/t_cpp_generator.cc
+ compiler/cpp/src/generate/t_csharp_generator.cc
+ compiler/cpp/src/generate/t_erl_generator.cc
+ compiler/cpp/src/generate/t_hs_generator.cc
+ compiler/cpp/src/generate/t_java_generator.cc
+ compiler/cpp/src/generate/t_ocaml_generator.cc
+ compiler/cpp/src/generate/t_perl_generator.cc
+ compiler/cpp/src/generate/t_php_generator.cc
+ compiler/cpp/src/generate/t_py_generator.cc
+ compiler/cpp/src/generate/t_rb_generator.cc
+ compiler/cpp/src/generate/t_st_generator.cc
+ compiler/cpp/src/generate/t_xsd_generator.cc
+ compiler/cpp/src/main.cc
+ compiler/cpp/src/parse/t_field.h
+ compiler/cpp/src/parse/t_program.h
+ compiler/cpp/src/platform.h
+ compiler/cpp/src/thriftl.ll
+ compiler/cpp/src/thrifty.yy
+ lib/csharp/src/Protocol/TBinaryProtocol.cs
+ lib/csharp/src/Protocol/TField.cs
+ lib/csharp/src/Protocol/TList.cs
+ lib/csharp/src/Protocol/TMap.cs
+ lib/csharp/src/Protocol/TMessage.cs
+ lib/csharp/src/Protocol/TMessageType.cs
+ lib/csharp/src/Protocol/TProtocol.cs
+ lib/csharp/src/Protocol/TProtocolException.cs
+ lib/csharp/src/Protocol/TProtocolFactory.cs
+ lib/csharp/src/Protocol/TProtocolUtil.cs
+ lib/csharp/src/Protocol/TSet.cs
+ lib/csharp/src/Protocol/TStruct.cs
+ lib/csharp/src/Protocol/TType.cs
+ lib/csharp/src/Server/TServer.cs
+ lib/csharp/src/Server/TSimpleServer.cs
+ lib/csharp/src/Server/TThreadPoolServer.cs
+ lib/csharp/src/TApplicationException.cs
+ lib/csharp/src/Thrift.csproj
+ lib/csharp/src/Thrift.sln
+ lib/csharp/src/TProcessor.cs
+ lib/csharp/src/Transport/TServerSocket.cs
+ lib/csharp/src/Transport/TServerTransport.cs
+ lib/csharp/src/Transport/TSocket.cs
+ lib/csharp/src/Transport/TStreamTransport.cs
+ lib/csharp/src/Transport/TTransport.cs
+ lib/csharp/src/Transport/TTransportException.cs
+ lib/csharp/src/Transport/TTransportFactory.cs
+ lib/csharp/ThriftMSBuildTask/Properties/AssemblyInfo.cs
+ lib/csharp/ThriftMSBuildTask/ThriftBuild.cs
+ lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj
+ lib/rb/lib/thrift.rb
+ lib/st/README
+ lib/st/thrift.st
+ test/OptionalRequiredTest.cpp
+ test/OptionalRequiredTest.thrift
+ test/ThriftTest.thrift
+
+--------------------------------------------------
+For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components:
+
+# Copyright (c) 2007 Thomas Porschberg <thomas@randspringer.de>
+#
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved.
+
+--------------------------------------------------
+For the compiler/cpp/src/md5.[ch] components:
+
+/*
+ Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+
+---------------------------------------------------
+For the lib/rb/setup.rb: Copyright (c) 2000-2005 Minero Aoki,
+lib/ocaml/OCamlMakefile and lib/ocaml/README-OCamlMakefile components:
+ Copyright (C) 1999 - 2007 Markus Mottl
+
+Licensed under the terms of the GNU Lesser General Public License 2.1
+(see doc/lgpl-2.1.txt for the full terms of this license)
View
11 include/cassandra_constants.hrl
@@ -0,0 +1,11 @@
+%%
+%% Autogenerated by Thrift Compiler (0.7.0)
+%%
+%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+%%
+
+
+-include("cassandra_types.hrl").
+
+-define(cassandra_VERSION, "19.10.0").
+
View
5 include/cassandra_thrift.hrl
@@ -0,0 +1,5 @@
+-ifndef(_cassandra_included).
+-define(_cassandra_included, yeah).
+-include("cassandra_types.hrl").
+
+-endif.
View
214 include/cassandra_types.hrl
@@ -0,0 +1,214 @@
+-ifndef(_cassandra_types_included).
+-define(_cassandra_types_included, yeah).
+
+-define(cassandra_ConsistencyLevel_ONE, 1).
+-define(cassandra_ConsistencyLevel_QUORUM, 2).
+-define(cassandra_ConsistencyLevel_LOCAL_QUORUM, 3).
+-define(cassandra_ConsistencyLevel_EACH_QUORUM, 4).
+-define(cassandra_ConsistencyLevel_ALL, 5).
+-define(cassandra_ConsistencyLevel_ANY, 6).
+-define(cassandra_ConsistencyLevel_TWO, 7).
+-define(cassandra_ConsistencyLevel_THREE, 8).
+
+-define(cassandra_IndexOperator_EQ, 0).
+-define(cassandra_IndexOperator_GTE, 1).
+-define(cassandra_IndexOperator_GT, 2).
+-define(cassandra_IndexOperator_LTE, 3).
+-define(cassandra_IndexOperator_LT, 4).
+
+-define(cassandra_IndexType_KEYS, 0).
+
+-define(cassandra_Compression_GZIP, 1).
+-define(cassandra_Compression_NONE, 2).
+
+-define(cassandra_CqlResultType_ROWS, 1).
+-define(cassandra_CqlResultType_VOID, 2).
+-define(cassandra_CqlResultType_INT, 3).
+
+%% struct column
+
+-record(column, {name = undefined :: string(),
+ value = undefined :: string(),
+ timestamp = undefined :: integer(),
+ ttl = undefined :: integer()}).
+
+%% struct superColumn
+
+-record(superColumn, {name = undefined :: string(),
+ columns = [] :: list()}).
+
+%% struct counterColumn
+
+-record(counterColumn, {name = undefined :: string(),
+ value = undefined :: integer()}).
+
+%% struct counterSuperColumn
+
+-record(counterSuperColumn, {name = undefined :: string(),
+ columns = [] :: list()}).
+
+%% struct columnOrSuperColumn
+
+-record(columnOrSuperColumn, {column = #column{} :: #column{},
+ super_column = #superColumn{} :: #superColumn{},
+ counter_column = #counterColumn{} :: #counterColumn{},
+ counter_super_column = #counterSuperColumn{} :: #counterSuperColumn{}}).
+
+%% struct notFoundException
+
+-record(notFoundException, {}).
+
+%% struct invalidRequestException
+
+-record(invalidRequestException, {why = undefined :: string()}).
+
+%% struct unavailableException
+
+-record(unavailableException, {}).
+
+%% struct timedOutException
+
+-record(timedOutException, {}).
+
+%% struct authenticationException
+
+-record(authenticationException, {why = undefined :: string()}).
+
+%% struct authorizationException
+
+-record(authorizationException, {why = undefined :: string()}).
+
+%% struct schemaDisagreementException
+
+-record(schemaDisagreementException, {}).
+
+%% struct columnParent
+
+-record(columnParent, {column_family = undefined :: string(),
+ super_column = undefined :: string()}).
+
+%% struct columnPath
+
+-record(columnPath, {column_family = undefined :: string(),
+ super_column = undefined :: string(),
+ column = undefined :: string()}).
+
+%% struct sliceRange
+
+-record(sliceRange, {start = undefined :: string(),
+ finish = undefined :: string(),
+ reversed = false :: boolean(),
+ count = 100 :: integer()}).
+
+%% struct slicePredicate
+
+-record(slicePredicate, {column_names = [] :: list(),
+ slice_range = #sliceRange{} :: #sliceRange{}}).
+
+%% struct indexExpression
+
+-record(indexExpression, {column_name = undefined :: string(),
+ op = undefined :: integer(),
+ value = undefined :: string()}).
+
+%% struct indexClause
+
+-record(indexClause, {expressions = [] :: list(),
+ start_key = undefined :: string(),
+ count = 100 :: integer()}).
+
+%% struct keyRange
+
+-record(keyRange, {start_key = undefined :: string(),
+ end_key = undefined :: string(),
+ start_token = undefined :: string(),
+ end_token = undefined :: string(),
+ count = 100 :: integer()}).
+
+%% struct keySlice
+
+-record(keySlice, {key = undefined :: string(),
+ columns = [] :: list()}).
+
+%% struct keyCount
+
+-record(keyCount, {key = undefined :: string(),
+ count = undefined :: integer()}).
+
+%% struct deletion
+
+-record(deletion, {timestamp = undefined :: integer(),
+ super_column = undefined :: string(),
+ predicate = #slicePredicate{} :: #slicePredicate{}}).
+
+%% struct mutation
+
+-record(mutation, {column_or_supercolumn = #columnOrSuperColumn{} :: #columnOrSuperColumn{},
+ deletion = #deletion{} :: #deletion{}}).
+
+%% struct tokenRange
+
+-record(tokenRange, {start_token = undefined :: string(),
+ end_token = undefined :: string(),
+ endpoints = [] :: list()}).
+
+%% struct authenticationRequest
+
+-record(authenticationRequest, {credentials = dict:new() :: dict()}).
+
+%% struct columnDef
+
+-record(columnDef, {name = undefined :: string(),
+ validation_class = undefined :: string(),
+ index_type = undefined :: integer(),
+ index_name = undefined :: string()}).
+
+%% struct cfDef
+
+-record(cfDef, {keyspace = undefined :: string(),
+ name = undefined :: string(),
+ column_type = "Standard" :: string(),
+ comparator_type = "BytesType" :: string(),
+ subcomparator_type = undefined :: string(),
+ comment = undefined :: string(),
+ row_cache_size = 0 :: float(),
+ key_cache_size = 200000 :: float(),
+ read_repair_chance = 1 :: float(),
+ column_metadata = [] :: list(),
+ gc_grace_seconds = undefined :: integer(),
+ default_validation_class = undefined :: string(),
+ id = undefined :: integer(),
+ min_compaction_threshold = undefined :: integer(),
+ max_compaction_threshold = undefined :: integer(),
+ row_cache_save_period_in_seconds = undefined :: integer(),
+ key_cache_save_period_in_seconds = undefined :: integer(),
+ memtable_flush_after_mins = undefined :: integer(),
+ memtable_throughput_in_mb = undefined :: integer(),
+ memtable_operations_in_millions = undefined :: float(),
+ replicate_on_write = undefined :: boolean(),
+ merge_shards_chance = undefined :: float(),
+ key_validation_class = undefined :: string(),
+ row_cache_provider = "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider" :: string(),
+ key_alias = undefined :: string()}).
+
+%% struct ksDef
+
+-record(ksDef, {name = undefined :: string(),
+ strategy_class = undefined :: string(),
+ strategy_options = dict:new() :: dict(),
+ replication_factor = undefined :: integer(),
+ cf_defs = [] :: list(),
+ durable_writes = true :: boolean()}).
+
+%% struct cqlRow
+
+-record(cqlRow, {key = undefined :: string(),
+ columns = [] :: list()}).
+
+%% struct cqlResult
+
+-record(cqlResult, {type = undefined :: integer(),
+ rows = [] :: list(),
+ num = undefined :: integer()}).
+
+-endif.
View
659 priv/cassandra.thrift
@@ -0,0 +1,659 @@
+#!/usr/local/bin/thrift --java --php --py
+# 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.
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# *** PLEASE REMEMBER TO EDIT THE VERSION CONSTANT WHEN MAKING CHANGES ***
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#
+# Interface definition for Cassandra Service
+#
+
+namespace java org.apache.cassandra.thrift
+namespace cpp org.apache.cassandra
+namespace csharp Apache.Cassandra
+namespace py cassandra
+namespace php cassandra
+namespace perl Cassandra
+
+# Thrift.rb has a bug where top-level modules that include modules
+# with the same name are not properly referenced, so we can't do
+# Cassandra::Cassandra::Client.
+namespace rb CassandraThrift
+
+# The API version (NOT the product version), composed as a dot delimited
+# string with major, minor, and patch level components.
+#
+# - Major: Incremented for backward incompatible changes. An example would
+# be changes to the number or disposition of method arguments.
+# - Minor: Incremented for backward compatible changes. An example would
+# be the addition of a new (optional) method.
+# - Patch: Incremented for bug fixes. The patch level should be increased
+# for every edit that doesn't result in a change to major/minor.
+#
+# See the Semantic Versioning Specification (SemVer) http://semver.org.
+const string VERSION = "19.10.0"
+
+
+#
+# data structures
+#
+
+/** 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.
+ */
+struct Column {
+ 1: required binary name,
+ 2: optional binary value,
+ 3: optional i64 timestamp,
+ 4: optional i32 ttl,
+}
+
+/** 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).
+ */
+struct SuperColumn {
+ 1: required binary name,
+ 2: required list<Column> columns,
+}
+
+struct CounterColumn {
+ 1: required binary name,
+ 2: required i64 value
+}
+
+struct CounterSuperColumn {
+ 1: required binary name,
+ 2: required list<CounterColumn> columns
+}
+
+/**
+ 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().
+ */
+struct ColumnOrSuperColumn {
+ 1: optional Column column,
+ 2: optional SuperColumn super_column,
+ 3: optional CounterColumn counter_column,
+ 4: optional CounterSuperColumn counter_super_column
+}
+
+
+#
+# Exceptions
+# (note that internal server errors will raise a TApplicationException, courtesy of Thrift)
+#
+
+/** A specific column was requested that does not exist. */
+exception NotFoundException {
+}
+
+/** 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.
+*/
+exception InvalidRequestException {
+ 1: required string why
+}
+
+/** Not all the replicas required could be created and/or read. */
+exception UnavailableException {
+}
+
+/** RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large. */
+exception TimedOutException {
+}
+
+/** invalid authentication request (invalid keyspace, user does not exist, or credentials invalid) */
+exception AuthenticationException {
+ 1: required string why
+}
+
+/** invalid authorization request (user does not have access to keyspace) */
+exception AuthorizationException {
+ 1: required string why
+}
+
+/** schemas are not in agreement across all nodes */
+exception SchemaDisagreementException {
+}
+
+
+#
+# service api
+#
+/**
+ * The ConsistencyLevel is an enum that controls both read and write
+ * behavior based on the ReplicationFactor of the keyspace. The
+ * different consistency levels have different meanings, depending on
+ * if you're doing a write or read operation.
+ *
+ * If W + R > ReplicationFactor, where W is the number of nodes to
+ * block for on write, and R the number to block for on reads, you
+ * will have strongly consistent behavior; that is, readers will
+ * always see the most recent write. Of these, the most interesting is
+ * to do QUORUM reads and writes, which gives you consistency while
+ * still allowing availability in the face of node failures up to half
+ * of <ReplicationFactor>. Of course if latency is more important than
+ * consistency then you can use lower values for either or both.
+ *
+ * Some ConsistencyLevels (ONE, TWO, THREE) refer to a specific number
+ * of replicas rather than a logical concept that adjusts
+ * automatically with the replication factor. Of these, only ONE is
+ * commonly used; TWO and (even more rarely) THREE are only useful
+ * when you care more about guaranteeing a certain level of
+ * durability, than consistency.
+ *
+ * Write consistency levels make the following guarantees before reporting success to the client:
+ * ANY Ensure that the write has been written once somewhere, including possibly being hinted in a non-target node.
+ * ONE Ensure that the write has been written to at least 1 node's commit log and memory table
+ * TWO Ensure that the write has been written to at least 2 node's commit log and memory table
+ * THREE Ensure that the write has been written to at least 3 node's commit log and memory table
+ * QUORUM Ensure that the write has been written to <ReplicationFactor> / 2 + 1 nodes
+ * LOCAL_QUORUM Ensure that the write has been written to <ReplicationFactor> / 2 + 1 nodes, within the local datacenter (requires NetworkTopologyStrategy)
+ * EACH_QUORUM Ensure that the write has been written to <ReplicationFactor> / 2 + 1 nodes in each datacenter (requires NetworkTopologyStrategy)
+ * ALL Ensure that the write is written to <code>&lt;ReplicationFactor&gt;</code> nodes before responding to the client.
+ *
+ * Read consistency levels make the following guarantees before returning successful results to the client:
+ * ANY Not supported. You probably want ONE instead.
+ * ONE Returns the record obtained from a single replica.
+ * TWO Returns the record with the most recent timestamp once two replicas have replied.
+ * THREE Returns the record with the most recent timestamp once three replicas have replied.
+ * QUORUM Returns the record with the most recent timestamp once a majority of replicas have replied.
+ * LOCAL_QUORUM Returns the record with the most recent timestamp once a majority of replicas within the local datacenter have replied.
+ * EACH_QUORUM Returns the record with the most recent timestamp once a majority of replicas within each datacenter have replied.
+ * ALL Returns the record with the most recent timestamp once all replicas have replied (implies no replica may be down)..
+*/
+enum ConsistencyLevel {
+ ONE = 1,
+ QUORUM = 2,
+ LOCAL_QUORUM = 3,
+ EACH_QUORUM = 4,
+ ALL = 5,
+ ANY = 6,
+ TWO = 7,
+ THREE = 8,
+}
+
+/**
+ 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>
+ */
+struct ColumnParent {
+ 3: required string column_family,
+ 4: optional binary super_column,
+}
+
+/** 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.
+ */
+struct ColumnPath {
+ 3: required string column_family,
+ 4: optional binary super_column,
+ 5: optional binary column,
+}
+
+/**
+ 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.
+ */
+struct SliceRange {
+ 1: required binary start,
+ 2: required binary finish,
+ 3: required bool reversed=0,
+ 4: required i32 count=100,
+}
+
+/**
+ 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.
+ */
+struct SlicePredicate {
+ 1: optional list<binary> column_names,
+ 2: optional SliceRange slice_range,
+}
+
+enum IndexOperator {
+ EQ,
+ GTE,
+ GT,
+ LTE,
+ LT
+}
+
+struct IndexExpression {
+ 1: required binary column_name,
+ 2: required IndexOperator op,
+ 3: required binary value,
+}
+
+struct IndexClause {
+ 1: required list<IndexExpression> expressions
+ 2: required binary start_key,
+ 3: required i32 count=100,
+}
+
+/**
+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.
+*/
+struct KeyRange {
+ 1: optional binary start_key,
+ 2: optional binary end_key,
+ 3: optional string start_token,
+ 4: optional string end_token,
+ 5: required i32 count=100
+}
+
+/**
+ 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.
+ */
+struct KeySlice {
+ 1: required binary key,
+ 2: required list<ColumnOrSuperColumn> columns,
+}
+
+struct KeyCount {
+ 1: required binary key,
+ 2: required i32 count
+}
+
+/**
+ * Note that the timestamp is only optional in case of counter deletion.
+ */
+struct Deletion {
+ 1: optional i64 timestamp,
+ 2: optional binary super_column,
+ 3: optional SlicePredicate predicate,
+}
+
+/**
+ 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
+*/
+struct Mutation {
+ 1: optional ColumnOrSuperColumn column_or_supercolumn,
+ 2: optional Deletion deletion,
+}
+
+struct TokenRange {
+ 1: required string start_token,
+ 2: required string end_token,
+ 3: required list<string> endpoints,
+}
+
+/**
+ Authentication requests can contain any data, dependent on the IAuthenticator used
+*/
+struct AuthenticationRequest {
+ 1: required map<string, string> credentials
+}
+
+enum IndexType {
+ KEYS,
+}
+
+/* describes a column in a column family. */
+struct ColumnDef {
+ 1: required binary name,
+ 2: required string validation_class,
+ 3: optional IndexType index_type,
+ 4: optional string index_name
+}
+
+
+/* describes a column family. */
+struct CfDef {
+ 1: required string keyspace,
+ 2: required string name,
+ 3: optional string column_type="Standard",
+ 5: optional string comparator_type="BytesType",
+ 6: optional string subcomparator_type,
+ 8: optional string comment,
+ 9: optional double row_cache_size=0,
+ 11: optional double key_cache_size=200000,
+ 12: optional double read_repair_chance=1.0,
+ 13: optional list<ColumnDef> column_metadata,
+ 14: optional i32 gc_grace_seconds,
+ 15: optional string default_validation_class,
+ 16: optional i32 id,
+ 17: optional i32 min_compaction_threshold,
+ 18: optional i32 max_compaction_threshold,
+ 19: optional i32 row_cache_save_period_in_seconds,
+ 20: optional i32 key_cache_save_period_in_seconds,
+ 21: optional i32 memtable_flush_after_mins,
+ 22: optional i32 memtable_throughput_in_mb,
+ 23: optional double memtable_operations_in_millions,
+ 24: optional bool replicate_on_write,
+ 25: optional double merge_shards_chance,
+ 26: optional string key_validation_class,
+ 27: optional string row_cache_provider="org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider",
+ 28: optional binary key_alias,
+}
+
+/* describes a keyspace. */
+struct KsDef {
+ 1: required string name,
+ 2: required string strategy_class,
+ 3: optional map<string,string> strategy_options,
+
+ /** @deprecated */
+ 4: optional i32 replication_factor,
+
+ 5: required list<CfDef> cf_defs,
+ 6: optional bool durable_writes=1,
+}
+
+/** CQL query compression */
+enum Compression {
+ GZIP = 1,
+ NONE = 2
+}
+
+enum CqlResultType {
+ ROWS = 1,
+ VOID = 2,
+ INT = 3
+}
+
+/** Row returned from a CQL query */
+struct CqlRow {
+ 1: required binary key,
+ 2: required list<Column> columns
+}
+
+struct CqlResult {
+ 1: required CqlResultType type,
+ 2: optional list<CqlRow> rows,
+ 3: optional i32 num
+}
+
+service Cassandra {
+ # auth methods
+ void login(1: required AuthenticationRequest auth_request) throws (1:AuthenticationException authnx, 2:AuthorizationException authzx),
+
+ # set keyspace
+ void set_keyspace(1: required string keyspace) throws (1:InvalidRequestException ire),
+
+ # retrieval methods
+
+ /**
+ Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is
+ the only method that can throw an exception under non-failure conditions.)
+ */
+ ColumnOrSuperColumn get(1:required binary key,
+ 2:required ColumnPath column_path,
+ 3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:NotFoundException nfe, 3:UnavailableException ue, 4:TimedOutException te),
+
+ /**
+ Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name
+ pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned.
+ */
+ list<ColumnOrSuperColumn> get_slice(1:required binary key,
+ 2:required ColumnParent column_parent,
+ 3:required SlicePredicate predicate,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ returns the number of columns matching <code>predicate</code> for a particular <code>key</code>,
+ <code>ColumnFamily</code> and optionally <code>SuperColumn</code>.
+ */
+ i32 get_count(1:required binary key,
+ 2:required ColumnParent column_parent,
+ 3:required SlicePredicate predicate,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ Performs a get_slice for column_parent and predicate for the given keys in parallel.
+ */
+ map<binary,list<ColumnOrSuperColumn>> multiget_slice(1:required list<binary> keys,
+ 2:required ColumnParent column_parent,
+ 3:required SlicePredicate predicate,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ Perform a get_count in parallel on the given list<binary> keys. The return value maps keys to the count found.
+ */
+ map<binary, i32> multiget_count(1:required list<binary> keys,
+ 2:required ColumnParent column_parent,
+ 3:required SlicePredicate predicate,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ returns a subset of columns for a contiguous range of keys.
+ */
+ list<KeySlice> get_range_slices(1:required ColumnParent column_parent,
+ 2:required SlicePredicate predicate,
+ 3:required KeyRange range,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /** Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause */
+ list<KeySlice> get_indexed_slices(1:required ColumnParent column_parent,
+ 2:required IndexClause index_clause,
+ 3:required SlicePredicate column_predicate,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ # modification methods
+
+ /**
+ * Insert a Column at the given column_parent.column_family and optional column_parent.super_column.
+ */
+ void insert(1:required binary key,
+ 2:required ColumnParent column_parent,
+ 3:required Column column,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ * Increment or decrement a counter.
+ */
+ void add(1:required binary key,
+ 2:required ColumnParent column_parent,
+ 3:required CounterColumn column,
+ 4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note
+ that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire
+ row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too.
+ */
+ void remove(1:required binary key,
+ 2:required ColumnPath column_path,
+ 3:required i64 timestamp,
+ 4:ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ * Remove a counter at the specified location.
+ * Note that counters have limited support for deletes: if you remove a counter, you must wait to issue any following update
+ * until the delete has reached all the nodes and all of them have been fully compacted.
+ */
+ void remove_counter(1:required binary key,
+ 2:required ColumnPath path,
+ 3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+
+ /**
+ Mutate many columns or super columns for many row keys. See also: Mutation.
+
+ mutation_map maps key to column family to a list of Mutation objects to take place at that scope.
+ **/
+ void batch_mutate(1:required map<binary, map<string, list<Mutation>>> mutation_map,
+ 2:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
+
+ /**
+ Truncate will mark and entire column family as deleted.
+ From the user's perspective a successful call to truncate will result complete data deletion from cfname.
+ Internally, however, disk space will not be immediatily released, as with all deletes in cassandra, this one
+ only marks the data as deleted.
+ The operation succeeds only if all hosts in the cluster at available and will throw an UnavailableException if
+ some hosts are down.
+ */
+ void truncate(1:required string cfname)
+ throws (1: InvalidRequestException ire, 2: UnavailableException ue),
+
+
+
+ // Meta-APIs -- APIs to get information about the node or cluster,
+ // rather than user data. The nodeprobe program provides usage examples.
+
+ /**
+ * for each schema version present in the cluster, returns a list of nodes at that version.
+ * hosts that do not respond will be under the key DatabaseDescriptor.INITIAL_VERSION.
+ * the cluster is all on the same version if the size of the map is 1.
+ */
+ map<string, list<string>> describe_schema_versions()
+ throws (1: InvalidRequestException ire),
+
+ /** list the defined keyspaces in this cluster */
+ list<KsDef> describe_keyspaces()
+ throws (1:InvalidRequestException ire),
+
+ /** get the cluster name */
+ string describe_cluster_name(),
+
+ /** get the thrift api version */
+ string describe_version(),
+
+ /** get the token ring: a map of ranges to host addresses,
+ represented as a set of TokenRange instead of a map from range
+ to list of endpoints, because you can't use Thrift structs as
+ map keys:
+ https://issues.apache.org/jira/browse/THRIFT-162
+
+ for the same reason, we can't return a set here, even though
+ order is neither important nor predictable. */
+ list<TokenRange> describe_ring(1:required string keyspace)
+ throws (1:InvalidRequestException ire),
+
+ /** returns the partitioner used by this cluster */
+ string describe_partitioner(),
+
+ /** returns the snitch used by this cluster */
+ string describe_snitch(),
+
+ /** describe specified keyspace */
+ KsDef describe_keyspace(1:required string keyspace)
+ throws (1:NotFoundException nfe, 2:InvalidRequestException ire),
+
+ /** experimental API for hadoop/parallel query support.
+ may change violently and without warning.
+
+ returns list of token strings such that first subrange is (list[0], list[1]],
+ next is (list[1], list[2]], etc. */
+ list<string> describe_splits(1:required string cfName,
+ 2:required string start_token,
+ 3:required string end_token,
+ 4:required i32 keys_per_split)
+ throws (1:InvalidRequestException ire),
+
+ /** adds a column family. returns the new schema id. */
+ string system_add_column_family(1:required CfDef cf_def)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /** drops a column family. returns the new schema id. */
+ string system_drop_column_family(1:required string column_family)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /** adds a keyspace and any column families that are part of it. returns the new schema id. */
+ string system_add_keyspace(1:required KsDef ks_def)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /** drops a keyspace and any column families that are part of it. returns the new schema id. */
+ string system_drop_keyspace(1:required string keyspace)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /** updates properties of a keyspace. returns the new schema id. */
+ string system_update_keyspace(1:required KsDef ks_def)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /** updates properties of a column family. returns the new schema id. */
+ string system_update_column_family(1:required CfDef cf_def)
+ throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
+
+ /**
+ * Executes a CQL (Cassandra Query Language) statement and returns a
+ * CqlResult containing the results.
+ */
+ CqlResult execute_cql_query(1:required binary query, 2:required Compression compression)
+ throws (1:InvalidRequestException ire,
+ 2:UnavailableException ue,
+ 3:TimedOutException te,
+ 4:SchemaDisagreementException sde)
+}
View
BIN  rebar
Binary file not shown
View
4 src/cassandra.app.src
@@ -0,0 +1,4 @@
+{application, cassandra, [
+ {description, "Cassandra Thrift Interface"},
+ {vsn, "19.10.0"}
+]}.
View
297 src/cassandra_thrift.erl
@@ -0,0 +1,297 @@
+%%
+%% Autogenerated by Thrift Compiler (0.7.0)
+%%
+%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+%%
+
+-module(cassandra_thrift).
+-behaviour(thrift_service).
+
+
+-include("cassandra_thrift.hrl").
+
+-export([struct_info/1, function_info/2]).
+
+struct_info('i am a dummy struct') -> undefined.
+%%% interface
+% login(This, Auth_request)
+function_info('login', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'authenticationRequest'}}}]}
+;
+function_info('login', reply_type) ->
+ {struct, []};
+function_info('login', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'authenticationException'}}}, {2, {struct, {'cassandra_types', 'authorizationException'}}}]}
+;
+% set_keyspace(This, Keyspace)
+function_info('set_keyspace', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('set_keyspace', reply_type) ->
+ {struct, []};
+function_info('set_keyspace', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% get(This, Key, Column_path, Consistency_level)
+function_info('get', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnPath'}}}, {3, i32}]}
+;
+function_info('get', reply_type) ->
+ {struct, {'cassandra_types', 'columnOrSuperColumn'}};
+function_info('get', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'notFoundException'}}}, {3, {struct, {'cassandra_types', 'unavailableException'}}}, {4, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% get_slice(This, Key, Column_parent, Predicate, Consistency_level)
+function_info('get_slice', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}, {4, i32}]}
+;
+function_info('get_slice', reply_type) ->
+ {list, {struct, {'cassandra_types', 'columnOrSuperColumn'}}};
+function_info('get_slice', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% get_count(This, Key, Column_parent, Predicate, Consistency_level)
+function_info('get_count', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}, {4, i32}]}
+;
+function_info('get_count', reply_type) ->
+ i32;
+function_info('get_count', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% multiget_slice(This, Keys, Column_parent, Predicate, Consistency_level)
+function_info('multiget_slice', params_type) ->
+ {struct, [{1, {list, string}}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}, {4, i32}]}
+;
+function_info('multiget_slice', reply_type) ->
+ {map, string, {list, {struct, {'cassandra_types', 'columnOrSuperColumn'}}}};
+function_info('multiget_slice', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% multiget_count(This, Keys, Column_parent, Predicate, Consistency_level)
+function_info('multiget_count', params_type) ->
+ {struct, [{1, {list, string}}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}, {4, i32}]}
+;
+function_info('multiget_count', reply_type) ->
+ {map, string, i32};
+function_info('multiget_count', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% get_range_slices(This, Column_parent, Predicate, Range, Consistency_level)
+function_info('get_range_slices', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'columnParent'}}}, {2, {struct, {'cassandra_types', 'slicePredicate'}}}, {3, {struct, {'cassandra_types', 'keyRange'}}}, {4, i32}]}
+;
+function_info('get_range_slices', reply_type) ->
+ {list, {struct, {'cassandra_types', 'keySlice'}}};
+function_info('get_range_slices', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% get_indexed_slices(This, Column_parent, Index_clause, Column_predicate, Consistency_level)
+function_info('get_indexed_slices', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'columnParent'}}}, {2, {struct, {'cassandra_types', 'indexClause'}}}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}, {4, i32}]}
+;
+function_info('get_indexed_slices', reply_type) ->
+ {list, {struct, {'cassandra_types', 'keySlice'}}};
+function_info('get_indexed_slices', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% insert(This, Key, Column_parent, Column, Consistency_level)
+function_info('insert', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'column'}}}, {4, i32}]}
+;
+function_info('insert', reply_type) ->
+ {struct, []};
+function_info('insert', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% add(This, Key, Column_parent, Column, Consistency_level)
+function_info('add', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnParent'}}}, {3, {struct, {'cassandra_types', 'counterColumn'}}}, {4, i32}]}
+;
+function_info('add', reply_type) ->
+ {struct, []};
+function_info('add', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% remove(This, Key, Column_path, Timestamp, Consistency_level)
+function_info('remove', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnPath'}}}, {3, i64}, {4, i32}]}
+;
+function_info('remove', reply_type) ->
+ {struct, []};
+function_info('remove', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% remove_counter(This, Key, Path, Consistency_level)
+function_info('remove_counter', params_type) ->
+ {struct, [{1, string}, {2, {struct, {'cassandra_types', 'columnPath'}}}, {3, i32}]}
+;
+function_info('remove_counter', reply_type) ->
+ {struct, []};
+function_info('remove_counter', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% batch_mutate(This, Mutation_map, Consistency_level)
+function_info('batch_mutate', params_type) ->
+ {struct, [{1, {map, string, {map, string, {list, {struct, {'cassandra_types', 'mutation'}}}}}}, {2, i32}]}
+;
+function_info('batch_mutate', reply_type) ->
+ {struct, []};
+function_info('batch_mutate', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}]}
+;
+% truncate(This, Cfname)
+function_info('truncate', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('truncate', reply_type) ->
+ {struct, []};
+function_info('truncate', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}]}
+;
+% describe_schema_versions(This)
+function_info('describe_schema_versions', params_type) ->
+ {struct, []}
+;
+function_info('describe_schema_versions', reply_type) ->
+ {map, string, {list, string}};
+function_info('describe_schema_versions', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% describe_keyspaces(This)
+function_info('describe_keyspaces', params_type) ->
+ {struct, []}
+;
+function_info('describe_keyspaces', reply_type) ->
+ {list, {struct, {'cassandra_types', 'ksDef'}}};
+function_info('describe_keyspaces', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% describe_cluster_name(This)
+function_info('describe_cluster_name', params_type) ->
+ {struct, []}
+;
+function_info('describe_cluster_name', reply_type) ->
+ string;
+function_info('describe_cluster_name', exceptions) ->
+ {struct, []}
+;
+% describe_version(This)
+function_info('describe_version', params_type) ->
+ {struct, []}
+;
+function_info('describe_version', reply_type) ->
+ string;
+function_info('describe_version', exceptions) ->
+ {struct, []}
+;
+% describe_ring(This, Keyspace)
+function_info('describe_ring', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('describe_ring', reply_type) ->
+ {list, {struct, {'cassandra_types', 'tokenRange'}}};
+function_info('describe_ring', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% describe_partitioner(This)
+function_info('describe_partitioner', params_type) ->
+ {struct, []}
+;
+function_info('describe_partitioner', reply_type) ->
+ string;
+function_info('describe_partitioner', exceptions) ->
+ {struct, []}
+;
+% describe_snitch(This)
+function_info('describe_snitch', params_type) ->
+ {struct, []}
+;
+function_info('describe_snitch', reply_type) ->
+ string;
+function_info('describe_snitch', exceptions) ->
+ {struct, []}
+;
+% describe_keyspace(This, Keyspace)
+function_info('describe_keyspace', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('describe_keyspace', reply_type) ->
+ {struct, {'cassandra_types', 'ksDef'}};
+function_info('describe_keyspace', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'notFoundException'}}}, {2, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% describe_splits(This, CfName, Start_token, End_token, Keys_per_split)
+function_info('describe_splits', params_type) ->
+ {struct, [{1, string}, {2, string}, {3, string}, {4, i32}]}
+;
+function_info('describe_splits', reply_type) ->
+ {list, string};
+function_info('describe_splits', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}]}
+;
+% system_add_column_family(This, Cf_def)
+function_info('system_add_column_family', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'cfDef'}}}]}
+;
+function_info('system_add_column_family', reply_type) ->
+ string;
+function_info('system_add_column_family', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% system_drop_column_family(This, Column_family)
+function_info('system_drop_column_family', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('system_drop_column_family', reply_type) ->
+ string;
+function_info('system_drop_column_family', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% system_add_keyspace(This, Ks_def)
+function_info('system_add_keyspace', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'ksDef'}}}]}
+;
+function_info('system_add_keyspace', reply_type) ->
+ string;
+function_info('system_add_keyspace', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% system_drop_keyspace(This, Keyspace)
+function_info('system_drop_keyspace', params_type) ->
+ {struct, [{1, string}]}
+;
+function_info('system_drop_keyspace', reply_type) ->
+ string;
+function_info('system_drop_keyspace', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% system_update_keyspace(This, Ks_def)
+function_info('system_update_keyspace', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'ksDef'}}}]}
+;
+function_info('system_update_keyspace', reply_type) ->
+ string;
+function_info('system_update_keyspace', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% system_update_column_family(This, Cf_def)
+function_info('system_update_column_family', params_type) ->
+ {struct, [{1, {struct, {'cassandra_types', 'cfDef'}}}]}
+;
+function_info('system_update_column_family', reply_type) ->
+ string;
+function_info('system_update_column_family', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+% execute_cql_query(This, Query, Compression)
+function_info('execute_cql_query', params_type) ->
+ {struct, [{1, string}, {2, i32}]}
+;
+function_info('execute_cql_query', reply_type) ->
+ {struct, {'cassandra_types', 'cqlResult'}};
+function_info('execute_cql_query', exceptions) ->
+ {struct, [{1, {struct, {'cassandra_types', 'invalidRequestException'}}}, {2, {struct, {'cassandra_types', 'unavailableException'}}}, {3, {struct, {'cassandra_types', 'timedOutException'}}}, {4, {struct, {'cassandra_types', 'schemaDisagreementException'}}}]}
+;
+function_info(_Func, _Info) -> no_function.
+
View
256 src/cassandra_types.erl
@@ -0,0 +1,256 @@
+%%
+%% Autogenerated by Thrift Compiler (0.7.0)
+%%
+%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+%%
+
+-module(cassandra_types).
+
+-include("cassandra_types.hrl").
+
+-export([struct_info/1, struct_info_ext/1]).
+
+struct_info('column') ->
+ {struct, [{1, string}, {2, string}, {3, i64}, {4, i32}]}
+;
+
+struct_info('superColumn') ->
+ {struct, [{1, string}, {2, {list, {struct, {'cassandra_types', 'column'}}}}]}
+;
+
+struct_info('counterColumn') ->
+ {struct, [{1, string}, {2, i64}]}
+;
+
+struct_info('counterSuperColumn') ->
+ {struct, [{1, string}, {2, {list, {struct, {'cassandra_types', 'counterColumn'}}}}]}
+;
+
+struct_info('columnOrSuperColumn') ->
+ {struct, [{1, {struct, {'cassandra_types', 'column'}}}, {2, {struct, {'cassandra_types', 'superColumn'}}}, {3, {struct, {'cassandra_types', 'counterColumn'}}}, {4, {struct, {'cassandra_types', 'counterSuperColumn'}}}]}
+;
+
+struct_info('notFoundException') ->
+ {struct, []}
+;
+
+struct_info('invalidRequestException') ->
+ {struct, [{1, string}]}
+;
+
+struct_info('unavailableException') ->
+ {struct, []}
+;
+
+struct_info('timedOutException') ->
+ {struct, []}
+;
+
+struct_info('authenticationException') ->
+ {struct, [{1, string}]}
+;
+
+struct_info('authorizationException') ->
+ {struct, [{1, string}]}
+;
+
+struct_info('schemaDisagreementException') ->
+ {struct, []}
+;
+
+struct_info('columnParent') ->
+ {struct, [{3, string}, {4, string}]}
+;
+
+struct_info('columnPath') ->
+ {struct, [{3, string}, {4, string}, {5, string}]}
+;
+
+struct_info('sliceRange') ->
+ {struct, [{1, string}, {2, string}, {3, bool}, {4, i32}]}
+;
+
+struct_info('slicePredicate') ->
+ {struct, [{1, {list, string}}, {2, {struct, {'cassandra_types', 'sliceRange'}}}]}
+;
+
+struct_info('indexExpression') ->
+ {struct, [{1, string}, {2, i32}, {3, string}]}
+;
+
+struct_info('indexClause') ->
+ {struct, [{1, {list, {struct, {'cassandra_types', 'indexExpression'}}}}, {2, string}, {3, i32}]}
+;
+
+struct_info('keyRange') ->
+ {struct, [{1, string}, {2, string}, {3, string}, {4, string}, {5, i32}]}
+;
+
+struct_info('keySlice') ->
+ {struct, [{1, string}, {2, {list, {struct, {'cassandra_types', 'columnOrSuperColumn'}}}}]}
+;
+
+struct_info('keyCount') ->
+ {struct, [{1, string}, {2, i32}]}
+;
+
+struct_info('deletion') ->
+ {struct, [{1, i64}, {2, string}, {3, {struct, {'cassandra_types', 'slicePredicate'}}}]}
+;
+
+struct_info('mutation') ->
+ {struct, [{1, {struct, {'cassandra_types', 'columnOrSuperColumn'}}}, {2, {struct, {'cassandra_types', 'deletion'}}}]}
+;
+
+struct_info('tokenRange') ->
+ {struct, [{1, string}, {2, string}, {3, {list, string}}]}
+;
+
+struct_info('authenticationRequest') ->
+ {struct, [{1, {map, string, string}}]}
+;
+
+struct_info('columnDef') ->
+ {struct, [{1, string}, {2, string}, {3, i32}, {4, string}]}
+;
+
+struct_info('cfDef') ->
+ {struct, [{1, string}, {2, string}, {3, string}, {5, string}, {6, string}, {8, string}, {9, double}, {11, double}, {12, double}, {13, {list, {struct, {'cassandra_types', 'columnDef'}}}}, {14, i32}, {15, string}, {16, i32}, {17, i32}, {18, i32}, {19, i32}, {20, i32}, {21, i32}, {22, i32}, {23, double}, {24, bool}, {25, double}, {26, string}, {27, string}, {28, string}]}
+;
+
+struct_info('ksDef') ->
+ {struct, [{1, string}, {2, string}, {3, {map, string, string}}, {4, i32}, {5, {list, {struct, {'cassandra_types', 'cfDef'}}}}, {6, bool}]}
+;
+
+struct_info('cqlRow') ->
+ {struct, [{1, string}, {2, {list, {struct, {'cassandra_types', 'column'}}}}]}
+;
+
+struct_info('cqlResult') ->
+ {struct, [{1, i32}, {2, {list, {struct, {'cassandra_types', 'cqlRow'}}}}, {3, i32}]}
+;
+
+struct_info('i am a dummy struct') -> undefined.
+
+struct_info_ext('column') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, optional, string, 'value', undefined}, {3, optional, i64, 'timestamp', undefined}, {4, optional, i32, 'ttl', undefined}]}
+;
+
+struct_info_ext('superColumn') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, required, {list, {struct, {'cassandra_types', 'column'}}}, 'columns', []}]}
+;
+
+struct_info_ext('counterColumn') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, required, i64, 'value', undefined}]}
+;
+
+struct_info_ext('counterSuperColumn') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, required, {list, {struct, {'cassandra_types', 'counterColumn'}}}, 'columns', []}]}
+;
+
+struct_info_ext('columnOrSuperColumn') ->
+ {struct, [{1, optional, {struct, {'cassandra_types', 'column'}}, 'column', #column{}}, {2, optional, {struct, {'cassandra_types', 'superColumn'}}, 'super_column', #superColumn{}}, {3, optional, {struct, {'cassandra_types', 'counterColumn'}}, 'counter_column', #counterColumn{}}, {4, optional, {struct, {'cassandra_types', 'counterSuperColumn'}}, 'counter_super_column', #counterSuperColumn{}}]}
+;
+
+struct_info_ext('notFoundException') ->
+ {struct, []}
+;
+
+struct_info_ext('invalidRequestException') ->
+ {struct, [{1, required, string, 'why', undefined}]}
+;
+
+struct_info_ext('unavailableException') ->
+ {struct, []}
+;
+
+struct_info_ext('timedOutException') ->
+ {struct, []}
+;
+
+struct_info_ext('authenticationException') ->
+ {struct, [{1, required, string, 'why', undefined}]}
+;
+
+struct_info_ext('authorizationException') ->
+ {struct, [{1, required, string, 'why', undefined}]}
+;
+
+struct_info_ext('schemaDisagreementException') ->
+ {struct, []}
+;
+
+struct_info_ext('columnParent') ->
+ {struct, [{3, required, string, 'column_family', undefined}, {4, optional, string, 'super_column', undefined}]}
+;
+
+struct_info_ext('columnPath') ->
+ {struct, [{3, required, string, 'column_family', undefined}, {4, optional, string, 'super_column', undefined}, {5, optional, string, 'column', undefined}]}
+;
+
+struct_info_ext('sliceRange') ->
+ {struct, [{1, required, string, 'start', undefined}, {2, required, string, 'finish', undefined}, {3, required, bool, 'reversed', false}, {4, required, i32, 'count', 100}]}
+;
+
+struct_info_ext('slicePredicate') ->
+ {struct, [{1, optional, {list, string}, 'column_names', []}, {2, optional, {struct, {'cassandra_types', 'sliceRange'}}, 'slice_range', #sliceRange{}}]}
+;
+
+struct_info_ext('indexExpression') ->
+ {struct, [{1, required, string, 'column_name', undefined}, {2, required, i32, 'op', undefined}, {3, required, string, 'value', undefined}]}
+;
+
+struct_info_ext('indexClause') ->
+ {struct, [{1, required, {list, {struct, {'cassandra_types', 'indexExpression'}}}, 'expressions', []}, {2, required, string, 'start_key', undefined}, {3, required, i32, 'count', 100}]}
+;
+
+struct_info_ext('keyRange') ->
+ {struct, [{1, optional, string, 'start_key', undefined}, {2, optional, string, 'end_key', undefined}, {3, optional, string, 'start_token', undefined}, {4, optional, string, 'end_token', undefined}, {5, required, i32, 'count', 100}]}
+;
+
+struct_info_ext('keySlice') ->
+ {struct, [{1, required, string, 'key', undefined}, {2, required, {list, {struct, {'cassandra_types', 'columnOrSuperColumn'}}}, 'columns', []}]}
+;
+
+struct_info_ext('keyCount') ->
+ {struct, [{1, required, string, 'key', undefined}, {2, required, i32, 'count', undefined}]}
+;
+
+struct_info_ext('deletion') ->
+ {struct, [{1, optional, i64, 'timestamp', undefined}, {2, optional, string, 'super_column', undefined}, {3, optional, {struct, {'cassandra_types', 'slicePredicate'}}, 'predicate', #slicePredicate{}}]}
+;
+
+struct_info_ext('mutation') ->
+ {struct, [{1, optional, {struct, {'cassandra_types', 'columnOrSuperColumn'}}, 'column_or_supercolumn', #columnOrSuperColumn{}}, {2, optional, {struct, {'cassandra_types', 'deletion'}}, 'deletion', #deletion{}}]}
+;
+
+struct_info_ext('tokenRange') ->
+ {struct, [{1, required, string, 'start_token', undefined}, {2, required, string, 'end_token', undefined}, {3, required, {list, string}, 'endpoints', []}]}
+;
+
+struct_info_ext('authenticationRequest') ->
+ {struct, [{1, required, {map, string, string}, 'credentials', dict:new()}]}
+;
+
+struct_info_ext('columnDef') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, required, string, 'validation_class', undefined}, {3, optional, i32, 'index_type', undefined}, {4, optional, string, 'index_name', undefined}]}
+;
+
+struct_info_ext('cfDef') ->
+ {struct, [{1, required, string, 'keyspace', undefined}, {2, required, string, 'name', undefined}, {3, optional, string, 'column_type', "Standard"}, {5, optional, string, 'comparator_type', "BytesType"}, {6, optional, string, 'subcomparator_type', undefined}, {8, optional, string, 'comment', undefined}, {9, optional, double, 'row_cache_size', 0}, {11, optional, double, 'key_cache_size', 200000}, {12, optional, double, 'read_repair_chance', 1}, {13, optional, {list, {struct, {'cassandra_types', 'columnDef'}}}, 'column_metadata', []}, {14, optional, i32, 'gc_grace_seconds', undefined}, {15, optional, string, 'default_validation_class', undefined}, {16, optional, i32, 'id', undefined}, {17, optional, i32, 'min_compaction_threshold', undefined}, {18, optional, i32, 'max_compaction_threshold', undefined}, {19, optional, i32, 'row_cache_save_period_in_seconds', undefined}, {20, optional, i32, 'key_cache_save_period_in_seconds', undefined}, {21, optional, i32, 'memtable_flush_after_mins', undefined}, {22, optional, i32, 'memtable_throughput_in_mb', undefined}, {23, optional, double, 'memtable_operations_in_millions', undefined}, {24, optional, bool, 'replicate_on_write', undefined}, {25, optional, double, 'merge_shards_chance', undefined}, {26, optional, string, 'key_validation_class', undefined}, {27, optional, string, 'row_cache_provider', "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider"}, {28, optional, string, 'key_alias', undefined}]}
+;
+
+struct_info_ext('ksDef') ->
+ {struct, [{1, required, string, 'name', undefined}, {2, required, string, 'strategy_class', undefined}, {3, optional, {map, string, string}, 'strategy_options', dict:new()}, {4, optional, i32, 'replication_factor', undefined}, {5, required, {list, {struct, {'cassandra_types', 'cfDef'}}}, 'cf_defs', []}, {6, optional, bool, 'durable_writes', true}]}
+;
+
+struct_info_ext('cqlRow') ->
+ {struct, [{1, required, string, 'key', undefined}, {2, required, {list, {struct, {'cassandra_types', 'column'}}}, 'columns', []}]}
+;
+
+struct_info_ext('cqlResult') ->
+ {struct, [{1, required, i32, 'type', undefined}, {2, optional, {list, {struct, {'cassandra_types', 'cqlRow'}}}, 'rows', []}, {3, optional, i32, 'num', undefined}]}
+;
+
+struct_info_ext('i am a dummy struct') -> undefined.
+
Please sign in to comment.
Something went wrong with that request. Please try again.