/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Cassandra internal/internode communication protocol */ @namespace("org.apache.cassandra") protocol InterNode { @aliases(["org.apache.cassandra.config.avro.IndexType"]) @namespace("org.apache.cassandra.db.migration.avro") enum IndexType { KEYS } @aliases(["org.apache.cassandra.config.avro.ColumnDef"]) @namespace("org.apache.cassandra.db.migration.avro") record ColumnDef { bytes name; string validation_class; union { IndexType, null } index_type; union { string, null } index_name; } @aliases(["org.apache.cassandra.config.avro.CfDef"]) @namespace("org.apache.cassandra.db.migration.avro") 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; boolean replicate_on_write = false; union { int, null } gc_grace_seconds; union { null, string } default_validation_class = null; union { null, string } key_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 { null, double} merge_shards_chance = null; union { int, null } id; union { array, null } column_metadata; union { string, null } row_cache_provider = "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider"; union { null, bytes } key_alias = null; } @aliases(["org.apache.cassandra.config.avro.KsDef"]) @namespace("org.apache.cassandra.db.migration.avro") record KsDef { string name; string strategy_class; union{ map, null } strategy_options; union{ int, null } replication_factor; array cf_defs; boolean durable_writes = true; } @namespace("org.apache.cassandra.utils.avro") fixed UUID(16); @namespace("org.apache.cassandra.db.migration.avro") record AddColumnFamily { CfDef cf; } @namespace("org.apache.cassandra.db.migration.avro") record AddKeyspace { KsDef ks; } @namespace("org.apache.cassandra.db.migration.avro") record DropColumnFamily { string ksname; string cfname; } @namespace("org.apache.cassandra.db.migration.avro") record DropKeyspace { string ksname; } @namespace("org.apache.cassandra.db.migration.avro") record RenameColumnFamily { string ksname; int cfid; string old_cfname; string new_cfname; } @namespace("org.apache.cassandra.db.migration.avro") record RenameKeyspace { string old_ksname; string new_ksname; } @namespace("org.apache.cassandra.db.migration.avro") record UpdateKeyspace { KsDef oldKs; KsDef newKs; } @namespace("org.apache.cassandra.db.migration.avro") record UpdateColumnFamily { CfDef metadata; } @namespace("org.apache.cassandra.db.migration.avro") record Migration { org.apache.cassandra.utils.avro.UUID old_version; org.apache.cassandra.utils.avro.UUID new_version; bytes row_mutation; string classname; union { AddColumnFamily,DropColumnFamily,RenameColumnFamily,AddKeyspace,DropKeyspace,RenameKeyspace,UpdateKeyspace,UpdateColumnFamily } migration; } }