Skip to content

Commit

Permalink
[HWKMETRICS-556] use TWCS for data_compressed table
Browse files Browse the repository at this point in the history
We are also switching back to STCS for the data table because we are now doing
range deletes as part of the compression job. Eventually I think we'll switch
over to using what are essentially temporary tables for raw data that we just
drop once we are done writing to them and have compressed the data.

[HWKEMTRICS-556] license header

[HWKMETRICS-556] this is what i get for trying to catch up with work on the weekend

[HWKMETRICS-556] cehckstyle
  • Loading branch information
John Sanda committed Feb 13, 2017
1 parent 7b85681 commit 2e64925
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -55,7 +55,7 @@ public void run(Session session, String keyspace, boolean resetDB) {
// For now, I am just hard coding the version tag, but a more robust solution would be
// to calculate the tags using the current version stored in the sys_config table
// and the new version which we can extract from any of our JAR manifest files.
List<String> tags = asList("0.15.x", "0.18.x", "0.19.x", "0.20.x", "0.21.x");
List<String> tags = asList("0.15.x", "0.18.x", "0.19.x", "0.20.x", "0.21.x", "0.23.x");
URI script = getScript();
cassalog.execute(script, tags, vars);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.hawkular.schema
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -25,3 +25,4 @@ include '/org/hawkular/schema/updates/schema-0.18.0.groovy'
include '/org/hawkular/schema/updates/schema-0.19.0.groovy'
include '/org/hawkular/schema/updates/schema-0.20.0.groovy'
include '/org/hawkular/schema/updates/schema-0.21.0.groovy'
include '/org/hawkular/schema/updates/schema-0.23.0.groovy'
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

schemaChange {
version '6.0'
author 'jsanda'
tags '0.23.x'
cql """
ALTER TABLE data_compressed WITH compaction = {
'class': 'TimeWindowCompactionStrategy',
'compaction_window_unit': 'DAYS',
'compaction_window_size': '1'
}
"""
}

schemaChange {
version '6.1'
author 'jsanda'
tags '0.23.x'
cql "ALTER TABLE data WITH compaction = {'class': 'SizeTieredCompactionStrategy'}"
}

0 comments on commit 2e64925

Please sign in to comment.