cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Thompson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9252) for DateTieredCompactionStrategy, TIMESTAMP_RESOLUTION_KEY sets wrong msxSSTableAge value if RESOLUTION is other than MILLISECONDS
Date Mon, 27 Apr 2015 22:19:38 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-9252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Philip Thompson updated CASSANDRA-9252:
---------------------------------------
    Reproduced In: 2.0.14
    Fix Version/s:     (was: 2.0.14)
                   2.0.15
         Assignee: Marcus Eriksson

> for DateTieredCompactionStrategy, TIMESTAMP_RESOLUTION_KEY sets wrong msxSSTableAge value
if RESOLUTION is other than MILLISECONDS
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9252
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9252
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Linux/CentOS
>            Reporter: mike
>            Assignee: Marcus Eriksson
>             Fix For: 2.0.15
>
>         Attachments: DateTieredCompactionStrategy.java, DateTieredCompactionStrategyOptions.java
>
>
> I was trying to set 'timestamp_resolution' to MINUTES/HOURS/DAYS. it turned out maxSSTableAge
was set as wrong value. In the code,
> {code}
>     public DateTieredCompactionStrategyOptions(Map<String, String> options)
>     {
>         String optionValue = options.get(TIMESTAMP_RESOLUTION_KEY);
>         TimeUnit timestampResolution = optionValue == null ? DEFAULT_TIMESTAMP_RESOLUTION
: TimeUnit.valueOf(optionValue);
>         optionValue = options.get(MAX_SSTABLE_AGE_KEY);
>         double fractionalDays = optionValue == null ? DEFAULT_MAX_SSTABLE_AGE_DAYS :
Double.parseDouble(optionValue);
>         maxSSTableAge = Math.round(fractionalDays * timestampResolution.convert(1, TimeUnit.DAYS));
>  ...   }{code}
> maxSSTableAge will be set as the value in "timestamp_resolution" unit, such as , with
the following settings,
>         'timestamp_resolution':'HOURS',
>         'max_sstable_age_days':'7',
>         'base_time_seconds':'3600'
> and I get: 
> maxSSTableAge=168,  baseTime=1
> while in the following routine, it expect maxSSTableAge as milliseconds
>     static Iterable<SSTableReader> filterOldSSTables(List<SSTableReader>
sstables, long maxSSTableAge, long now)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message