Skip to content

Commit 32d5415

Browse files
ssekaranmaedhroz
authored andcommitted
ninja-fix: remove SSTable format and disk access mode randomization
patch by Shruti Sekaran; reviewed by Caleb Rackliffe and Francisco Guerrero
1 parent 989901e commit 32d5415

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

src/java/org/apache/cassandra/config/CassandraRelevantProperties.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ public enum CassandraRelevantProperties
509509
SNAPSHOT_MIN_ALLOWED_TTL_SECONDS("cassandra.snapshot.min_allowed_ttl_seconds", "60"),
510510
SSL_ENABLE("ssl.enable"),
511511
SSL_STORAGE_PORT("cassandra.ssl_storage_port"),
512-
SSTABLE_FORMAT_DEFAULT("cassandra.sstable.format.default"),
513512
START_GOSSIP("cassandra.start_gossip", "true"),
514513
START_NATIVE_TRANSPORT("cassandra.start_native_transport"),
515514
STORAGE_DIR("cassandra.storagedir"),

test/simulator/main/org/apache/cassandra/simulator/ClusterSimulation.java

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.lang.reflect.Field;
2323
import java.lang.reflect.Modifier;
2424
import java.util.ArrayList;
25-
import java.util.Arrays;
2625
import java.util.EnumMap;
2726
import java.util.LinkedHashMap;
2827
import java.util.List;
@@ -43,7 +42,6 @@
4342
import org.slf4j.LoggerFactory;
4443

4544
import org.apache.cassandra.concurrent.ExecutorFactory;
46-
import org.apache.cassandra.config.CassandraRelevantProperties;
4745
import org.apache.cassandra.config.ParameterizedClass;
4846
import org.apache.cassandra.distributed.Cluster;
4947
import org.apache.cassandra.distributed.api.Feature;
@@ -197,7 +195,6 @@ public static abstract class Builder<S extends Simulation>
197195
protected LongConsumer onThreadLocalRandomCheck;
198196
protected String memtableType = null;
199197
protected String memtableAllocationType = null;
200-
protected String sstableFormat = null;
201198

202199
public Debug debug()
203200
{
@@ -538,12 +535,6 @@ public Builder<S> memtableAllocationType(String type)
538535
return this;
539536
}
540537

541-
public Builder<S> sstableFormat(String format)
542-
{
543-
this.sstableFormat = format;
544-
return this;
545-
}
546-
547538
public abstract ClusterSimulation<S> create(long seed) throws IOException;
548539
}
549540

@@ -726,20 +717,6 @@ public ClusterSimulation(RandomSource random, long seed, int uniqueNum,
726717
}
727718
randomizedConfig.put("memtable_allocation_type", memtableAllocationType);
728719

729-
// Randomize SSTable format
730-
String sstableFormat;
731-
if (builder.sstableFormat != null)
732-
{
733-
sstableFormat = builder.sstableFormat;
734-
}
735-
else
736-
{
737-
String[] formats = {"big", "bti"};
738-
sstableFormat = formats[random.uniform(0, formats.length)];
739-
}
740-
randomizedConfig.put("sstable_format", sstableFormat);
741-
CassandraRelevantProperties.SSTABLE_FORMAT_DEFAULT.setString(sstableFormat);
742-
743720
KindOfSequence kindOfDriftSequence = Choices.uniform(KindOfSequence.values()).choose(random);
744721
KindOfSequence kindOfDiscontinuitySequence = Choices.uniform(KindOfSequence.values()).choose(random);
745722
randomizedConfig.put("clock_drift_sequence", kindOfDriftSequence.toString());
@@ -758,8 +735,7 @@ public ClusterSimulation(RandomSource random, long seed, int uniqueNum,
758735

759736
Failures failures = new Failures();
760737
ThreadAllocator threadAllocator = new ThreadAllocator(random, builder.threadCount, numOfNodes);
761-
List<String> allowedDiskAccessModes = Arrays.asList("mmap", "mmap_index_only", "standard");
762-
String disk_access_mode = allowedDiskAccessModes.get(random.uniform(0, allowedDiskAccessModes.size() - 1));
738+
String disk_access_mode = "standard";
763739
randomizedConfig.put("disk_access_mode", disk_access_mode);
764740
boolean commitlogCompressed = random.decide(.5f);
765741
cluster = snitch.setup(Cluster.build(numOfNodes)

0 commit comments

Comments
 (0)