Tabnine Logo
SchemaBuilder.leveledStrategy
Code IndexAdd Tabnine to your IDE (free)

How to use
leveledStrategy
method
in
com.datastax.driver.core.schemabuilder.SchemaBuilder

Best Java code snippets using com.datastax.driver.core.schemabuilder.SchemaBuilder.leveledStrategy (Showing top 11 results out of 315)

origin: palantir/atlasdb

private CompactionOptions<?> getCompaction(boolean appendHeavyReadLight) {
  return appendHeavyReadLight ? SchemaBuilder.sizedTieredStategy().minThreshold(4).maxThreshold(32)
      : SchemaBuilder.leveledStrategy();
}
origin: com.datastax.cassandra/cassandra-driver-core

@Test(groups = "unit")
public void should_create_leveled_compaction_option() throws Exception {
 // When
 final String built =
   leveledStrategy()
     .enabled(true)
     .ssTableSizeInMB(160)
     .tombstoneCompactionIntervalInDay(3)
     .tombstoneThreshold(0.7)
     .uncheckedTombstoneCompaction(true)
     .build();
 // Then
 assertThat(built)
   .isEqualTo(
     "{'class' : 'LeveledCompactionStrategy', "
       + "'enabled' : true, "
       + "'tombstone_compaction_interval' : 3, "
       + "'tombstone_threshold' : 0.7, "
       + "'unchecked_tombstone_compaction' : true, "
       + "'sstable_size_in_mb' : 160}");
}
origin: com.datastax.cassandra/cassandra-driver-core

.caching(Caching.ROWS_ONLY)
.comment("This is a comment")
.compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.compressionOptions(lz4())
.dcLocalReadRepairChance(0.21)
origin: com.datastax.cassandra/cassandra-driver-core

     .addColumn("a", ks.getUserType("atype").copy(true))
     .withOptions()
     .compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95)));
} else {
     .addColumn("a", DataType.cint())
     .withOptions()
     .compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95)));
origin: com.palantir.atlasdb/atlasdb-cassandra

private CompactionOptions<?> getCompaction(boolean appendHeavyReadLight) {
  return appendHeavyReadLight ? SchemaBuilder.sizedTieredStategy().minThreshold(4).maxThreshold(32)
      : SchemaBuilder.leveledStrategy();
}
origin: com.datastax.cassandra/cassandra-driver-core

.caching(Caching.ROWS_ONLY)
.comment("This is a comment")
.compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.compressionOptions(lz4())
.dcLocalReadRepairChance(0.21)
origin: com.datastax.dse/dse-java-driver-core

@Test(groups = "unit")
public void should_create_leveled_compaction_option() throws Exception {
 // When
 final String built =
   leveledStrategy()
     .enabled(true)
     .ssTableSizeInMB(160)
     .tombstoneCompactionIntervalInDay(3)
     .tombstoneThreshold(0.7)
     .uncheckedTombstoneCompaction(true)
     .build();
 // Then
 assertThat(built)
   .isEqualTo(
     "{'class' : 'LeveledCompactionStrategy', "
       + "'enabled' : true, "
       + "'tombstone_compaction_interval' : 3, "
       + "'tombstone_threshold' : 0.7, "
       + "'unchecked_tombstone_compaction' : true, "
       + "'sstable_size_in_mb' : 160}");
}
origin: org.janusgraph/janusgraph-cql

private static CompactionOptions<?> compactionOptions(final Configuration configuration) {
  if (!configuration.has(COMPACTION_STRATEGY)) {
    return null;
  }
  final CompactionOptions<?> compactionOptions = Match(configuration.get(COMPACTION_STRATEGY))
      .of(
          Case($("SizeTieredCompactionStrategy"), sizedTieredStategy()),
          Case($("DateTieredCompactionStrategy"), dateTieredStrategy()),
          Case($("LeveledCompactionStrategy"), leveledStrategy()));
  Array.of(configuration.get(COMPACTION_OPTIONS))
      .grouped(2)
      .forEach(keyValue -> compactionOptions.freeformOption(keyValue.get(0), keyValue.get(1)));
  return compactionOptions;
}
origin: com.datastax.dse/dse-java-driver-core

.caching(Caching.ROWS_ONLY)
.comment("This is a comment")
.compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.compressionOptions(lz4())
.dcLocalReadRepairChance(0.21)
origin: com.datastax.dse/dse-java-driver-core

     .addColumn("a", ks.getUserType("atype").copy(true))
     .withOptions()
     .compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95)));
} else {
     .addColumn("a", DataType.cint())
     .withOptions()
     .compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95)));
origin: com.datastax.dse/dse-java-driver-core

.caching(Caching.ROWS_ONLY)
.comment("This is a comment")
.compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.compressionOptions(lz4())
.dcLocalReadRepairChance(0.21)
com.datastax.driver.core.schemabuilderSchemaBuilderleveledStrategy

Javadoc

Create options for the leveled compaction strategy, to use in a CREATE or ALTER TABLE statement.

Popular methods of SchemaBuilder

  • createTable
    Start building a new CREATE TABLE statement.
  • createKeyspace
    Start building a new CREATE KEYSPACE statement.
  • dropKeyspace
    Start building a new DROP KEYSPACE statement.
  • dropTable
    Start building a new DROP TABLE statement.
  • lz4
    Create options for the LZ4 compression strategy, to use in a CREATE or ALTER TABLE statement.
  • sizedTieredStategy
    Create options for the size-tiered compaction strategy, for use in a CREATE or ALTER TABLE statement
  • createType
    Start building a new CREATE TYPE statement.
  • noSpeculativeRetry
    Create the speculative retry strategy that never retries reads, to use in a CREATE or ALTER TABLE st
  • createIndex
    Start building a new CREATE INDEX statement.
  • dateTieredStrategy
    Create options for the date-tiered compaction strategy, to use in a CREATE or ALTER TABLE statement.
  • deflate
    Create options for the Deflate compression strategy, to use in a CREATE or ALTER TABLE statement.
  • dropType
    Start building a new DROP TYPE statement.
  • deflate,
  • dropType,
  • noCompression,
  • snappy,
  • allRows,
  • alterKeyspace,
  • alterTable,
  • always,
  • dropIndex

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • Kernel (java.awt.image)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now