You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2011/01/16 05:05:45 UTC
svn commit: r1059455 - in /cassandra/trunk: build.xml
interface/cassandra.genavro
Author: eevans
Date: Sun Jan 16 04:05:44 2011
New Revision: 1059455
URL: http://svn.apache.org/viewvc?rev=1059455&view=rev
Log:
don't build schema for rpc interface
Patch by eevans; reviewed by Jeremy Hanna for CASSANDRA-926
Modified:
cassandra/trunk/build.xml
cassandra/trunk/interface/cassandra.genavro
Modified: cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=1059455&r1=1059454&r2=1059455&view=diff
==============================================================================
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Sun Jan 16 04:05:44 2011
@@ -222,9 +222,6 @@
<target name="avro-interface-generate-client" unless="avroInterfaceUpToDate"
depends="init,check-avro-generate,ivy-retrieve-build">
- <!-- A copy for interested clients. TODO: Jar this stuff up. -->
- <avromacro protocolname="cassandra" inputfile="${interface.dir}/cassandra.genavro"
- jsondir="${interface.avro.dir}" outputdir="${interface.avro.dir}" />
<!-- A copy for our build. -->
<avromacro protocolname="api" inputfile="${interface.dir}/cassandra.genavro"
jsondir="${build.dir}" outputdir="${build.src}" />
@@ -319,9 +316,6 @@
<classpath refid="cassandra.classpath" />
</taskdef>
- <!--<paranamer sourceDirectory="${interface.avro.dir}"-->
- <!--outputDirectory="${build.classes}"/>-->
-
<antcall target="createVersionPropFile"/>
</target>
@@ -679,7 +673,6 @@
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/gen-java"/>
- <classpathentry kind="src" path="interface/avro/gen-java"/>
<classpathentry kind="src" path="interface/thrift/gen-java"/>
<classpathentry kind="src" path="drivers/java/src"/>
<classpathentry kind="src" path="test/unit"/>
Modified: cassandra/trunk/interface/cassandra.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=1059455&r1=1059454&r2=1059455&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Sun Jan 16 04:05:44 2011
@@ -17,22 +17,11 @@
*/
/**
- * Cassandra client interface
+ * Cassandra client interface (legacy).
*/
@namespace("org.apache.cassandra.avro")
protocol Cassandra {
- record ColumnPath {
- string column_family;
- union { bytes, null } super_column;
- union { bytes, null } column;
- }
-
- record ColumnParent {
- string column_family;
- union { bytes, null } super_column;
- }
-
record Column {
bytes name;
bytes value;
@@ -63,49 +52,6 @@ protocol Cassandra {
union { SliceRange, null } slice_range;
}
- record TokenRange {
- string start_token;
- string end_token;
- array<string> endpoints;
- }
-
- enum IndexOperator {
- EQ, GTE, GT, LTE, LT
- }
-
- record IndexExpression {
- bytes column_name;
- IndexOperator op;
- bytes value;
- }
-
- record IndexClause {
- array<IndexExpression> expressions;
- bytes start_key;
- int count;
- }
-
- /**
- * 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.
- */
- record KeyRange {
- union { bytes, null } start_key;
- union { bytes, null } end_key;
- union { string, null } start_token;
- union { string, null } end_token;
- int count;
- }
-
- record KeySlice {
- bytes key;
- array<ColumnOrSuperColumn> columns;
- }
-
record Deletion {
long timestamp;
union { bytes, null } super_column;
@@ -117,263 +63,8 @@ protocol Cassandra {
union { Deletion, null } deletion;
}
- @aliases(["org.apache.cassandra.config.avro.IndexType"])
- enum IndexType {
- KEYS
- }
-
- /* describes a column in a column family. */
- @aliases(["org.apache.cassandra.config.avro.ColumnDef"])
- record ColumnDef {
- bytes name;
- string validation_class;
- union { IndexType, null } index_type;
- union { string, null } index_name;
- }
-
- /**
- * describes a keyspace:
- * NB: the id field is ignored during column family creation: the server will choose an appropriate value.
- */
- @aliases(["org.apache.cassandra.config.avro.CfDef"])
- record CfDef {
- string keyspace;
- string name;
- union { string, null } column_type;
- union { string, null } comparator_type;
- union { string, null } subcomparator_type;
- union { string, null } comment;
- union { double, null } row_cache_size;
- union { double, null } key_cache_size;
- union { double, null } read_repair_chance;
- union { boolean, null } replicate_on_write;
- union { int, null } gc_grace_seconds;
- union { null, string } default_validation_class = null;
- union { null, int } min_compaction_threshold = null;
- union { null, int } max_compaction_threshold = null;
- union { int, null } row_cache_save_period_in_seconds = 0;
- union { int, null } key_cache_save_period_in_seconds = 3600;
- union { int, null } memtable_flush_after_mins = 60;
- union { null, int } memtable_throughput_in_mb = null;
- union { null, double} memtable_operations_in_millions = null;
- union { int, null } id;
- union { array<ColumnDef>, null } column_metadata;
- }
-
- /* describes a keyspace. */
- @aliases(["org.apache.cassandra.config.avro.KsDef"])
- record KsDef {
- string name;
- string strategy_class;
- union{ map<string>, null } strategy_options;
- int replication_factor;
- array<CfDef> cf_defs;
- }
-
record StreamingMutation {
bytes key;
Mutation mutation;
}
-
- record MutationsMapEntry {
- bytes key;
- map<array<Mutation>> mutations;
- }
-
- record CoscsMapEntry {
- bytes key;
- array<ColumnOrSuperColumn> columns;
- }
-
- record KeyCountMapEntry {
- bytes key;
- int count;
- }
-
- record AuthenticationRequest {
- map<string> credentials;
- }
-
- enum ConsistencyLevel {
- ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL
- }
-
- error InvalidRequestException {
- union { string, null } why;
- }
-
- error NotFoundException {
- union { string, null } why;
- }
-
- error UnavailableException {
- union { string, null } why;
- }
-
- error TimedOutException {
- union { string, null } why;
- }
-
- error AuthenticationException {
- union { string, null } why;
- }
-
- error AuthorizationException {
- union { string, null } why;
- }
-
- void login (AuthenticationRequest auth_request)
- throws AuthenticationException, AuthorizationException;
-
- void set_keyspace(string keyspace) throws InvalidRequestException;
-
- ColumnOrSuperColumn get(bytes key,
- ColumnPath column_path,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, NotFoundException, UnavailableException,
- TimedOutException;
-
- /**
- * Get the group of columns contained by a 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.
- */
- array<ColumnOrSuperColumn> get_slice(bytes key,
- ColumnParent column_parent,
- SlicePredicate predicate,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- /**
- * Performs a get_slice for column_parent and predicate against the given
- * set of keys in parallel.
- */
- array<CoscsMapEntry> multiget_slice(array<bytes> keys,
- ColumnParent column_parent,
- SlicePredicate predicate,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- /**
- * Performs a get_count in parallel on the given list of keys. The
- * return value maps keys to the count found.
- */
- array<KeyCountMapEntry> multiget_count(array<bytes> keys,
- ColumnParent column_parent,
- SlicePredicate predicate,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- /**
- * Returns the subset of columns specified in SlicePredicate for
- * the rows matching the IndexClause.
- */
- array<KeySlice> get_indexed_slices(ColumnParent column_parent,
- IndexClause index_clause,
- SlicePredicate column_predicate,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- /**
- * Returns the number of columns matching a predicate for a particular
- * key, ColumnFamily, and optionally SuperColumn.
- */
- int get_count(bytes key,
- ColumnParent column_parent,
- SlicePredicate predicate,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- void insert(bytes key,
- ColumnParent column_parent,
- Column column,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- void remove(bytes key,
- ColumnPath column_path,
- long timestamp,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- void batch_mutate(array<MutationsMapEntry> mutation_map,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
-
- /**
- * Truncate will mark and entire column family as deleted. From the user's
- * perspective a successful call to truncate will result in complete data
- * deletion from column family. Internally, however, disk space will not be
- * immediately 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(string column_family)
- throws InvalidRequestException, UnavailableException;
-
- /**
- * Ask the cluster if they all are using the same migration id. Returns a
- * map of version->hosts-on-that-version. Hosts that did not respond will
- * be under the key DatabaseDescriptor.INITIAL_VERSION. Agreement can be
- * determined by checking if the size of the map is 1.
- */
- map<array<string>> check_schema_agreement()
- throws InvalidRequestException;
-
- string system_add_column_family(CfDef cf_def)
- throws InvalidRequestException;
-
- string system_add_keyspace(KsDef ks_def) throws InvalidRequestException;
-
- string system_drop_column_family(string column_family)
- throws InvalidRequestException;
-
- string system_drop_keyspace(string keyspace)
- throws InvalidRequestException;
-
- string system_update_column_family(CfDef cf_def)
- throws InvalidRequestException;
-
- string system_update_keyspace(KsDef ks_def)
- throws InvalidRequestException;
-
- array<string> describe_keyspaces();
-
- KsDef describe_keyspace(string keyspace) throws NotFoundException;
-
- string describe_cluster_name();
-
- string describe_version();
-
- string describe_partitioner();
-
- /**
- * 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.
- */
- array<string> describe_splits(string cfName,
- string start_token,
- string end_token,
- int keys_per_split);
-
- /**
- * Get the token ring: a map of ranges to host addresses, represented as
- * an array of TokenRange->start-end range and list of host addresses.
- */
- array<TokenRange> describe_ring(string keyspace)
- throws InvalidRequestException;
-
- /**
- *returns a subset of columns for a contiguous range of keys.
- */
- array<KeySlice> get_range_slices(ColumnParent column_parent,
- SlicePredicate predicate,
- KeyRange range,
- ConsistencyLevel consistency_level)
- throws InvalidRequestException, UnavailableException, TimedOutException;
}