Remove conf/harry-example.yaml

Patch by Alex Petrov, reviewed by Sam Tunnicliffe for CASSANDRA-19081/CASSANDRA-19208
This commit is contained in:
Alex Petrov 2023-12-08 08:26:17 +01:00
parent 9db161f038
commit b7e5675edd
2 changed files with 13 additions and 104 deletions

View File

@ -1,95 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
seed: 1596731732524
# Default schema provider generates random schema
schema_provider:
fixed:
keyspace: harry
table: test_table
partition_keys:
pk1: bigint
pk2: ascii
clustering_keys:
ck1: ascii
ck2: bigint
regular_columns:
v1: ascii
v2: bigint
v3: ascii
v4: bigint
static_keys:
s1: ascii
s2: bigint
s3: ascii
s4: bigint
# Clock is a component responsible for mapping _logical_ timestamps to _real-time_ ones.
#
# When reproducing test failures, and for validation purposes, a snapshot of such clock can
# be taken to map a real-time timestamp from the value retrieved from the database in order
# to map it back to the logical timestamp of the operation that wrote this value.
clock:
offset:
offset: 1000
drop_schema: false
create_schema: true
truncate_table: true
# Partition descriptor selector controls how partitions is selected based on the current logical
# timestamp. Default implementation is a sliding window of partition descriptors that will visit
# one partition after the other in the window `slide_after_repeats` times. After that will
# retire one partition descriptor, and pick one instead of it.
partition_descriptor_selector:
default:
window_size: 10
slide_after_repeats: 100
# Clustering descriptor selector controls how clusterings are picked within the partition:
# how many rows there can be in a partition, how many rows will be visited for a logical timestamp,
# how many operations there will be in batch, what kind of operations there will and how often
# each kind of operation is going to occur.
clustering_descriptor_selector:
default:
modifications_per_lts:
type: "constant"
constant: 2
rows_per_modification:
type: "constant"
constant: 2
operation_kind_weights:
DELETE_RANGE: 0
DELETE_SLICE: 0
DELETE_ROW: 0
DELETE_COLUMN: 0
DELETE_PARTITION: 0
DELETE_COLUMN_WITH_STATICS: 0
INSERT_WITH_STATICS: 50
INSERT: 50
UPDATE_WITH_STATICS: 50
UPDATE: 50
column_mask_bitsets: null
max_partition_size: 1000
metric_reporter:
no_op: {}
data_tracker:
locking:
max_seen_lts: -1
max_complete_lts: -1

View File

@ -18,6 +18,7 @@
package org.apache.cassandra.distributed.upgrade;
import java.util.Collections;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@ -34,6 +35,8 @@ import harry.visitors.QueryLogger;
import harry.visitors.RandomPartitionValidator;
import org.apache.cassandra.distributed.Constants;
import org.apache.cassandra.distributed.api.Feature;
import org.apache.cassandra.distributed.fuzz.FixedSchemaProviderConfiguration;
import org.apache.cassandra.distributed.fuzz.HarryHelper;
import org.apache.cassandra.distributed.harry.ClusterState;
import org.apache.cassandra.distributed.harry.ExistingClusterSUT;
import org.apache.cassandra.distributed.harry.FlaggedRunner;
@ -70,16 +73,17 @@ public class ClusterMetadataUpgradeHarryTest extends UpgradeTestBase
.withUpgradeListener(listener)
.setup((cluster) -> {
SchemaSpec schema = new SchemaSpec("harry", "test_table",
asList(pk("pk1", asciiType), pk("pk1", int64Type)),
asList(ck("ck1", asciiType), ck("ck1", int64Type)),
asList(regularColumn("regular1", asciiType), regularColumn("regular1", int64Type)),
asList(staticColumn("static1", asciiType), staticColumn("static1", int64Type)));
asList(pk("pk1", asciiType), pk("pk2", int64Type)),
asList(ck("ck1", asciiType), ck("ck2", int64Type)),
asList(regularColumn("regular1", asciiType), regularColumn("regular2", int64Type)),
asList(staticColumn("static1", asciiType), staticColumn("static2", int64Type)));
Configuration config = Configuration.fromFile("conf/harry-example.yaml")
.unbuild()
.setKeyspaceDdl(String.format("CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': %d};", schema.keyspace, 3))
.setSUT(new ExistingClusterSUT(cluster, listener))
.build();
Configuration config = HarryHelper.defaultConfiguration()
.setKeyspaceDdl(String.format("CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': %d};", schema.keyspace, 3))
.setSchemaProvider(new FixedSchemaProviderConfiguration(schema))
.setDataTracker(new Configuration.LockingDataTrackerConfiguration(-1l, -1l, Collections.emptyList()))
.setSUT(new ExistingClusterSUT(cluster, listener))
.build();
Future<?> f = es.submit(() -> {
try