diff --git a/manifests/topic.pp b/manifests/topic.pp index 61b452e..de3177b 100644 --- a/manifests/topic.pp +++ b/manifests/topic.pp @@ -1,43 +1,43 @@ # Author:: Liam Bennett (mailto:lbennett@opentable.com) # Copyright:: Copyright (c) 2013 OpenTable Inc # License:: MIT # == Define: kafka::topic # # This defined type is used to manage the creation of kafka topics. # define kafka::topic( String[1] $ensure = '', String[1] $zookeeper = '', Variant[Integer,String[1]] $replication_factor = 1, Variant[Integer,String[1]] $partitions = 1, String[1] $bin_dir = '/opt/kafka/bin', Optional[Hash[String[1],String[1]]] $config = undef, ) { if is_string($replication_factor) { - deprication('kafka::topic', 'Please use Integer type, not String, for paramter replication_factor') + deprecation('kafka::topic', 'Please use Integer type, not String, for paramter replication_factor') } if is_string($partitions) { - deprication('kafka::topic', 'Please use Integer type, not String, for paramter partitions') + deprecation('kafka::topic', 'Please use Integer type, not String, for paramter partitions') } $_zookeeper = "--zookeeper ${zookeeper}" $_replication_factor = "--replication-factor ${replication_factor}" $_partitions = "--partitions ${partitions}" if $config { $_config_array = $config.map |$key, $value| { "--config ${key}=${value}" } $_config = join($_config_array, ' ') } else { $_config = '' } if $ensure == 'present' { exec { "create topic ${name}": path => "/usr/bin:/usr/sbin/:/bin:/sbin:${bin_dir}", command => "kafka-topics.sh --create ${_zookeeper} ${_replication_factor} ${_partitions} --topic ${name} ${_config}", unless => "kafka-topics.sh --list ${_zookeeper} | grep -x ${name}", } } }