use of org.locationtech.geowave.datastore.cassandra.config.CassandraOptions in project geowave by locationtech.
the class CassandraStoreTestEnvironment method initOptions.
@Override
protected void initOptions(final StoreFactoryOptions options) {
final CassandraRequiredOptions cassandraOpts = (CassandraRequiredOptions) options;
cassandraOpts.getAdditionalOptions().setReplicationFactor(1);
cassandraOpts.getAdditionalOptions().setDurableWrites(false);
cassandraOpts.getAdditionalOptions().setGcGraceSeconds(0);
try {
final Map<String, String> tableOptions = new HashMap<>();
tableOptions.put("compaction", new ObjectMapper().writeValueAsString(SchemaBuilder.sizeTieredCompactionStrategy().withMinSSTableSizeInBytes(500000L).withMinThreshold(2).withUncheckedTombstoneCompaction(true).getOptions()));
tableOptions.put("gc_grace_seconds", new ObjectMapper().writeValueAsString(0));
cassandraOpts.getAdditionalOptions().setTableOptions(tableOptions);
} catch (final JsonProcessingException e) {
throw new RuntimeException(e);
}
cassandraOpts.setContactPoints("127.0.0.1");
((CassandraOptions) cassandraOpts.getStoreOptions()).setBatchWriteSize(5);
}
Aggregations