Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

caching options with deprecated syntax

We're seing such warnings:

WARN  [SharedPool-Worker-3] 2017-03-23 11:57:06,054 CFPropDefs.java:172 - Setting caching options with deprecated syntax.

when creating CFs like this:

CREATE TABLE "CF_ConversationIndex" (
  key blob,
  column1 blob,
  column2 timeuuid,
  column3 blob,
  value blob,
  PRIMARY KEY (key, column1, column2, column3) ) WITH COMPACT STORAGE
  AND CLUSTERING ORDER BY (column1 ASC, column2 ASC, column3 ASC)
  AND bloom_filter_fp_chance = 0.01
  AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  AND comment = 'Maintain the conversationID/ThreadID.'
  AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
                    'max_threshold': '32'}
  AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.SnappyCompressor'}
  AND dclocal_read_repair_chance = 0.1
  AND default_time_to_live = 0
  AND gc_grace_seconds = 1036800
  AND max_index_interval = 2048
  AND memtable_flush_period_in_ms = 0
  AND min_index_interval = 128
  AND read_repair_chance = 0.0
  AND speculative_retry = 'NONE';

on a C* 2.1.17 cluster and wonder as the caching option looks ok according to CQL 3.1 for C* 2.1

like image 589
Steffen Winther Sørensen Avatar asked Jun 19 '26 09:06

Steffen Winther Sørensen


2 Answers

On Caching option, Remove enclose single quote and Change double quote to Single quote

AND caching = {'keys':'ALL', 'rows_per_partition':'NONE'}
like image 61
Ashraful Islam Avatar answered Jun 22 '26 12:06

Ashraful Islam


Try to execute it without " ' ":

AND caching = {"keys":"ALL", "rows_per_partition":"NONE"}

Maybe this shed some light on the error message, the syntax looks ok:

public CachingOptions getCachingOptions() throws SyntaxException, ConfigurationException
{
    CachingOptions options = null;
    Object val = properties.get(KW_CACHING);
    if (val == null)
        return null;
    else if (val instanceof Map)
        options = CachingOptions.fromMap(getMap(KW_CACHING));
    else if (val instanceof String) // legacy syntax
    {
        options = CachingOptions.fromString(getSimple(KW_CACHING));
        logger.warn("Setting caching options with deprecated syntax.");
    }
    return options;
}

Link to caching docs: http://apiwave.com/java/snippets/addition/org.apache.cassandra.cache.CachingOptions

like image 36
nevsv Avatar answered Jun 22 '26 10:06

nevsv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!