You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
Cassandra/TimeWindowCompactionStrategy: Difference between revisions
imported>Eevans (stubbed out page) |
imported>Eevans (→Updating the deploy repo: nits) |
||
Line 1: | Line 1: | ||
[https://github.com/jeffjirsa/twcs <code>TimeWindowCompactionStrategy</code>] is an alternative to <code>DateTieredCompactionStrategy</code>, developed by [https://github.com/jeffjirsa/ Jeff Jirsa]. It ships with Cassandra 3.0.7 and later, (where <code>DateTieredCompactionStrategy</code> has been officially deprecated). For Cassandra versions < 3.0.7, it is possible to install time-window compaction out-of-tree. | |||
[https://github.com/ | == Source == | ||
Wikimedia maintains a [https://github.com/wikimedia/twcs/tree/deploy Github branch] of the repository, with the Maven <code>pom.xml</code> patched to deploy the jar to [http://archiva.wikimedia.org archiva.wikimedia.org]. | |||
== | == Deployment == | ||
The compaction strategy is deployed from https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/cassandra-twcs via [https://doc.wikimedia.org/mw-tools-scap/ Scap]. | |||
== | === Updating the deploy repo === | ||
https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/cassandra-twcs | The deploy repository makes use of git-fat to sync the jar file to a working copy from Archiva, as necessary. If you need to deploy a new version of the strategy, the basic steps are: | ||
# Build, and deploy to [[Archiva]] with Maven.<syntaxhighlight lang="shell-session"> | |||
$ cat ~/.m2/settings.xml | |||
<settings> | |||
<servers> | |||
<server> | |||
<id>wikimedia.releases</id> | |||
<username>archiva-deploy</username> | |||
<password>PASSWORD_GOES_HERE</password> | |||
</server> | |||
<server> | |||
<id>wikimedia.snapshots</id> | |||
<username>archiva-deploy</username> | |||
<password>PASSWORD_GOES_HERE</password> | |||
</server> | |||
</servers> | |||
</settings> | |||
$ mvn deploy | |||
... | |||
</syntaxhighlight> | |||
# Update the [https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/cassandra-twcs operations/software/cassandra-twcs] with the jar<syntaxhighlight lang="shell-session"> | |||
$ cp /path/to/twcs/target/TimeWindowCompactionStrategy.jar lib/cassandra-v2.2 | |||
$ git add lib/cassandra-v2.2/TimeWindowCompactionStrategy.jar | |||
$ git commit -m 'Adding TimeWindowCompactionStrategy.jar via git-fat' | |||
</syntaxhighlight> | |||
#: ''Note: Make sure that the jar you add to git is the same one uploaded in #1 (checksums should be matching). See [[Archiva#Adding_an_artifact_to_your_project|Adding an artifact to your project]] for additional information.'' | |||
# Deploy to the Cassandra nodes (see https://doc.wikimedia.org/mw-tools-scap/) | |||
# Update the Cassandra classpath entries as necessary (<code>cassandra::extra_classpath</code> in Puppet hiera) |
Latest revision as of 20:48, 6 October 2016
TimeWindowCompactionStrategy
is an alternative to DateTieredCompactionStrategy
, developed by Jeff Jirsa. It ships with Cassandra 3.0.7 and later, (where DateTieredCompactionStrategy
has been officially deprecated). For Cassandra versions < 3.0.7, it is possible to install time-window compaction out-of-tree.
Source
Wikimedia maintains a Github branch of the repository, with the Maven pom.xml
patched to deploy the jar to archiva.wikimedia.org.
Deployment
The compaction strategy is deployed from https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/cassandra-twcs via Scap.
Updating the deploy repo
The deploy repository makes use of git-fat to sync the jar file to a working copy from Archiva, as necessary. If you need to deploy a new version of the strategy, the basic steps are:
- Build, and deploy to Archiva with Maven.
$ cat ~/.m2/settings.xml <settings> <servers> <server> <id>wikimedia.releases</id> <username>archiva-deploy</username> <password>PASSWORD_GOES_HERE</password> </server> <server> <id>wikimedia.snapshots</id> <username>archiva-deploy</username> <password>PASSWORD_GOES_HERE</password> </server> </servers> </settings> $ mvn deploy ...
- Update the operations/software/cassandra-twcs with the jar
$ cp /path/to/twcs/target/TimeWindowCompactionStrategy.jar lib/cassandra-v2.2 $ git add lib/cassandra-v2.2/TimeWindowCompactionStrategy.jar $ git commit -m 'Adding TimeWindowCompactionStrategy.jar via git-fat'
- Note: Make sure that the jar you add to git is the same one uploaded in #1 (checksums should be matching). See Adding an artifact to your project for additional information.
- Deploy to the Cassandra nodes (see https://doc.wikimedia.org/mw-tools-scap/)
- Update the Cassandra classpath entries as necessary (
cassandra::extra_classpath
in Puppet hiera)