Tabnine Logo
TableOptionsMetadata.getCompaction
Code IndexAdd Tabnine to your IDE (free)

How to use
getCompaction
method
in
com.datastax.driver.core.TableOptionsMetadata

Best Java code snippets using com.datastax.driver.core.TableOptionsMetadata.getCompaction (Showing top 12 results out of 315)

origin: com.datastax.cassandra/cassandra-driver-core

   .append(options.getComment().replace("'", "''"))
   .append('\'');
and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction()));
and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression()));
if (cassandraVersion.getMajor() >= 2) {
origin: com.datastax.cassandra/cassandra-driver-core

  .onMaterializedViewAdded(removed.capture());
assertThat(removed.getValue()).hasName("mv1");
assertThat(removed.getValue().getOptions().getCompaction().get("class"))
  .contains("SizeTieredCompactionStrategy");
      .getMaterializedView("mv1")
      .getOptions()
      .getCompaction()
      .get("class"))
  .contains("SizeTieredCompactionStrategy");
verify(listener, timeout(NOTIF_TIMEOUT_MS).times(1))
  .onMaterializedViewChanged(current.capture(), previous.capture());
assertThat(previous.getValue().getOptions().getCompaction().get("class"))
  .contains("SizeTieredCompactionStrategy");
assertThat(current.getValue().getOptions().getCompaction().get("class"))
  .contains("LeveledCompactionStrategy");
      .getMaterializedView("mv1")
      .getOptions()
      .getCompaction()
      .get("class"))
  .contains("LeveledCompactionStrategy");
origin: io.zipkin/zipkin-cassandra-core

static Map<String, String> readMetadata(String keyspace, Cluster cluster) {
  Map<String, String> metadata = new LinkedHashMap<>();
  try (Session ignored = cluster.connect()) {
    KeyspaceMetadata keyspaceMetadata = getKeyspaceMetadata(keyspace, cluster);
    Map<String, String> replication = keyspaceMetadata.getReplication();
    if ("SimpleStrategy".equals(replication.get("class")) && "1".equals(replication.get("replication_factor"))) {
      LOG.warn("running with RF=1, this is not suitable for production. Optimal is 3+");
    }
    Map<String, String> tracesCompaction = keyspaceMetadata.getTable("traces").getOptions().getCompaction();
    metadata.put("traces.compaction.class", tracesCompaction.get("class"));
  }
  return metadata;
}
origin: io.zipkin.java/zipkin-storage-cassandra

static Metadata readMetadata(Session session) {
 KeyspaceMetadata keyspaceMetadata = getKeyspaceMetadata(session);
 Map<String, String> replication = keyspaceMetadata.getReplication();
 if ("SimpleStrategy".equals(replication.get("class")) && "1".equals(
   replication.get("replication_factor"))) {
  LOG.warn("running with RF=1, this is not suitable for production. Optimal is 3+");
 }
 String compactionClass =
   keyspaceMetadata.getTable("traces").getOptions().getCompaction().get("class");
 boolean hasDefaultTtl = hasUpgrade1_defaultTtl(keyspaceMetadata);
 if (!hasDefaultTtl) {
  LOG.warn("schema lacks default ttls: apply {}, or set CassandraStorage.ensureSchema=true",
    UPGRADE_1);
 }
 return new Metadata(compactionClass, hasDefaultTtl);
}
origin: io.zipkin.zipkin2/zipkin-storage-cassandra-v1

static Metadata readMetadata(Session session) {
 KeyspaceMetadata keyspaceMetadata = getKeyspaceMetadata(session);
 Map<String, String> replication = keyspaceMetadata.getReplication();
 if ("SimpleStrategy".equals(replication.get("class"))
  && "1".equals(replication.get("replication_factor"))) {
  LOG.warn("running with RF=1, this is not suitable for production. Optimal is 3+");
 }
 String compactionClass =
  keyspaceMetadata.getTable("traces").getOptions().getCompaction().get("class");
 boolean hasDefaultTtl = hasUpgrade1_defaultTtl(keyspaceMetadata);
 if (!hasDefaultTtl) {
  LOG.warn(
   "schema lacks default ttls: apply {}, or set CassandraStorage.ensureSchema=true",
   UPGRADE_1);
 }
 return new Metadata(compactionClass, hasDefaultTtl);
}
origin: com.datastax.cassandra/cassandra-driver-core

assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "10"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "10"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "ALL"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching())
  .doesNotContain(entry("rows_per_partition", "ALL")); // 2.1 +
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
origin: io.zipkin.zipkin2/zipkin-storage-cassandra

static Metadata readMetadata(Session session) {
 KeyspaceMetadata keyspaceMetadata =
  ensureKeyspaceMetadata(session, session.getLoggedKeyspace());
 Map<String, String> replication = keyspaceMetadata.getReplication();
 if ("SimpleStrategy".equals(replication.get("class"))) {
  if ("1".equals(replication.get("replication_factor"))) {
   LOG.warn("running with RF=1, this is not suitable for production. Optimal is 3+");
  }
  ConsistencyLevel cl =
   session.getCluster().getConfiguration().getQueryOptions().getConsistencyLevel();
  checkState(
   ConsistencyLevel.ONE == cl, "Do not define `local_dc` and use SimpleStrategy");
 }
 String compactionClass =
  keyspaceMetadata.getTable("span").getOptions().getCompaction().get("class");
 return new Metadata(compactionClass);
}
origin: io.prestosql.cassandra/cassandra-driver

if (options.getComment() != null)
  and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\'');
and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction()));
and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression()));
if (cassandraVersion.getMajor() >= 2) {
origin: com.facebook.presto.cassandra/cassandra-driver

if (options.getComment() != null)
  and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\'');
and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction()));
and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression()));
if (cassandraVersion.getMajor() >= 2) {
origin: com.yugabyte/cassandra-driver-core

if (options.getComment() != null)
  and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\'');
and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction()));
and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression()));
if (cassandraVersion.getMajor() >= 2) {
origin: com.datastax.dse/dse-java-driver-core

  .onMaterializedViewAdded(removed.capture());
assertThat(removed.getValue()).hasName("mv1");
assertThat(removed.getValue().getOptions().getCompaction().get("class"))
  .contains("SizeTieredCompactionStrategy");
      .getMaterializedView("mv1")
      .getOptions()
      .getCompaction()
      .get("class"))
  .contains("SizeTieredCompactionStrategy");
verify(listener, timeout(NOTIF_TIMEOUT_MS).times(1))
  .onMaterializedViewChanged(current.capture(), previous.capture());
assertThat(previous.getValue().getOptions().getCompaction().get("class"))
  .contains("SizeTieredCompactionStrategy");
assertThat(current.getValue().getOptions().getCompaction().get("class"))
  .contains("LeveledCompactionStrategy");
      .getMaterializedView("mv1")
      .getOptions()
      .getCompaction()
      .get("class"))
  .contains("LeveledCompactionStrategy");
origin: com.datastax.dse/dse-java-driver-core

assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "10"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "10"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching()).contains(entry("keys", "ALL"));
assertThat(table.getOptions().getCaching()).contains(entry("rows_per_partition", "ALL"));
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
assertThat(table.getOptions().getCompression())
  .contains(
assertThat(table.getOptions().getCaching())
  .doesNotContain(entry("rows_per_partition", "ALL")); // 2.1 +
assertThat(table.getOptions().getCompaction())
  .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"));
assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15"));
com.datastax.driver.coreTableOptionsMetadatagetCompaction

Javadoc

Returns the compaction options for this table.

Popular methods of TableOptionsMetadata

  • getComment
    Returns the commentary set for this table.
  • getDefaultTimeToLive
    Returns the default TTL for this table. Note: this option is not available in Cassandra 1.2 and will
  • getCompression
    Returns the compression options for this table.
  • getBloomFilterFalsePositiveChance
    Returns the false positive chance for the Bloom filter of this table.
  • getCaching
    Returns the caching options for this table.
  • getCrcCheckChance
    When compression is enabled, this option defines the probability with which checksums for compressed
  • getGcGraceInSeconds
    Returns the tombstone garbage collection grace time in seconds for this table.
  • getIndexInterval
    Returns the index interval option for this table. Note: this option is not available in Cassandra 1.
  • getLocalReadRepairChance
    Returns the cluster local read repair chance set for this table.
  • getMaxIndexInterval
    Returns the maximum index interval option for this table. Note: this option is available in Cassandr
  • getMinIndexInterval
    Returns the minimum index interval option for this table. Note: this option is available in Cassandr
  • getReadRepairChance
    Returns the chance with which a read repair is triggered for this table.
  • getMinIndexInterval,
  • getReadRepairChance,
  • getReplicateOnWrite,
  • getSpeculativeRetry,
  • isCompactStorage,
  • <init>,
  • isCDC,
  • isNullOrAbsent,
  • getMemtableFlushPeriodInMs

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Kernel (java.awt.image)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • JComboBox (javax.swing)
  • JOptionPane (javax.swing)
  • Best IntelliJ plugins
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