Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ cassandra::java:

### Java garbage collection settings

__Deprication notice:__ `cassandra::java_gc` and the class `cassandra::java::gc` are now deprecated. Consider using JVM option sets instead.

Settings to Java garbage collector can be made by instanciating the `cassandra::java::gc` class. This can be done via the `java_gc` parameter of this module. E.g.:

```yaml
Expand Down
3 changes: 3 additions & 0 deletions manifests/java/gc.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @summary Setup the Java garbage collection for Cassandra
#
# Deprication notice: this class is now deprecated. Consider using JVM option sets instead.
#
# This class allows to set consistent JVM options at once, especially for the
# purpose of garbage collection settings. This is enabled by managing
# jvm.options file, available from Cassandra version 3.0 and later.
Expand Down Expand Up @@ -39,6 +41,7 @@
Enum['cms','g1'] $collector,
Hash[String,Data] $params = {},
) {
notify { 'The class cassandra::java::gc is deprecated now, consider using cassandra::jvm_option_sets instead!': }
file{ "${cassandra::config_dir}/jvm.options":
ensure => file,
content => epp("cassandra/jvm.${collector}.options.epp", $params),
Expand Down
4 changes: 4 additions & 0 deletions spec/classes/java/32_gc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_notify('The class cassandra::java::gc is deprecated now, consider using cassandra::jvm_option_sets instead!') }
it do
is_expected.to contain_file('/etc/cassandra/jvm.options')
.with_ensure('file')
Expand All @@ -32,6 +33,7 @@
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_notify('The class cassandra::java::gc is deprecated now, consider using cassandra::jvm_option_sets instead!') }
it do
is_expected.to contain_file('/etc/cassandra/jvm.options')
.with_ensure('file')
Expand All @@ -48,6 +50,7 @@
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_notify('The class cassandra::java::gc is deprecated now, consider using cassandra::jvm_option_sets instead!') }
it do
is_expected.to contain_file('/etc/cassandra/jvm.options')
.with_ensure('file')
Expand All @@ -69,6 +72,7 @@
end

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_notify('The class cassandra::java::gc is deprecated now, consider using cassandra::jvm_option_sets instead!') }
it do
is_expected.to contain_file('/etc/cassandra/jvm.options')
.with_ensure('file')
Expand Down