Skip to content

Commit

Permalink
zoo.cfg: Add maxSessionTimeout in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
Spredzy committed Jun 4, 2015
1 parent 9a4bcb6 commit 582f0bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
$init_limit = 10,
$sync_limit = 5,
$leader = true,
$max_session_timeout = undef,
) {
require zookeeper::install

Expand Down
4 changes: 3 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
$packages = ['zookeeper'],
$repo = undef,
$install_java = false,
$java_package = undef
$java_package = undef,
$max_session_timeout = undef,
) {

validate_array($packages)
Expand Down Expand Up @@ -102,6 +103,7 @@
tracefile_threshold => $tracefile_threshold,
max_allowed_connections => $max_allowed_connections,
peer_type => $peer_type,
max_session_timeout => $max_session_timeout,
}->
class { 'zookeeper::service':
cfg_dir => $cfg_dir,
Expand Down
4 changes: 4 additions & 0 deletions templates/conf/zoo.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ maxClientCnxns=<%= @max_allowed_connections %>
# Zookeeper peer type
peerType=<%= @peer_type %>
<% end -%>

<% if @max_session_timeout -%>
maxSessionTimeout=<%= @max_session_timeout %>
<% end -%>

0 comments on commit 582f0bf

Please sign in to comment.