Kafka should create partitions at start

Closes-bug: #1666888
Change-Id: I80c73fe66eda35d1e48a01e688ffccdb39e96cfc
Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
This commit is contained in:
Illia Polliul 2017-03-03 18:43:03 +01:00
parent b4c6c299d6
commit 4913edf43f
2 changed files with 10 additions and 5 deletions

View File

@ -61,6 +61,7 @@ class contrail::analytics {
'DEFAULTS/analytics_config_audit_ttl': value => '-1'; 'DEFAULTS/analytics_config_audit_ttl': value => '-1';
'DEFAULTS/analytics_statistics_ttl': value => '-1'; 'DEFAULTS/analytics_statistics_ttl': value => '-1';
'DEFAULTS/analytics_flow_ttl': value => '-1'; 'DEFAULTS/analytics_flow_ttl': value => '-1';
'DEFAULTS/partitions': value => '30';
'DISCOVERY/disc_server_ip': value => $contrail::contrail_private_vip; 'DISCOVERY/disc_server_ip': value => $contrail::contrail_private_vip;
'DISCOVERY/disc_server_port': value => '5998'; 'DISCOVERY/disc_server_port': value => '5998';
'REDIS/redis_server_port': value => '6379'; 'REDIS/redis_server_port': value => '6379';
@ -80,6 +81,7 @@ class contrail::analytics {
'DEFAULT/syslog_port': value => '-1'; 'DEFAULT/syslog_port': value => '-1';
'DEFAULT/http_server_port': value => '8089'; 'DEFAULT/http_server_port': value => '8089';
'DEFAULT/kafka_broker_list': value => $contrail::kafka_broker_list; 'DEFAULT/kafka_broker_list': value => $contrail::kafka_broker_list;
'DEFAULT/partitions': value => '30';
'COLLECTOR/port': value => '8086'; 'COLLECTOR/port': value => '8086';
'DISCOVERY/server': value => $contrail::contrail_private_vip; 'DISCOVERY/server': value => $contrail::contrail_private_vip;
'REDIS/port': value => '6379'; 'REDIS/port': value => '6379';
@ -119,6 +121,7 @@ class contrail::analytics {
'DEFAULTS/log_file': value => '/var/log/contrail/contrail-alarm-gen.log'; 'DEFAULTS/log_file': value => '/var/log/contrail/contrail-alarm-gen.log';
'DEFAULTS/kafka_broker_list': value => $contrail::kafka_broker_list; 'DEFAULTS/kafka_broker_list': value => $contrail::kafka_broker_list;
'DEFAULTS/zk_list': value => $contrail::zk_server_ip; 'DEFAULTS/zk_list': value => $contrail::zk_server_ip;
'DEFAULTS/partitions': value => '30';
'DISCOVERY/disc_server_ip': value => $contrail::contrail_private_vip; 'DISCOVERY/disc_server_ip': value => $contrail::contrail_private_vip;
'DISCOVERY/disc_server_port': value => '5998'; 'DISCOVERY/disc_server_port': value => '5998';
'REDIS/redis_server_port': value => '6379'; 'REDIS/redis_server_port': value => '6379';

View File

@ -62,7 +62,7 @@ log.dirs=/tmp/kafka-logs
# The default number of log partitions per topic. More partitions allow greater # The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across # parallelism for consumption, but this will also result in more files across
# the brokers. # the brokers.
num.partitions=1 num.partitions=30
# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown. # The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
# This value is recommended to be increased for installations with data dirs located in RAID array. # This value is recommended to be increased for installations with data dirs located in RAID array.
@ -93,14 +93,14 @@ num.recovery.threads.per.data.dir=1
# from the end of the log. # from the end of the log.
# The minimum age of a log file to be eligible for deletion # The minimum age of a log file to be eligible for deletion
log.retention.hours=168 log.retention.hours=24
# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining # A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
# segments don't drop below log.retention.bytes. # segments don't drop below log.retention.bytes.
#log.retention.bytes=1073741824 log.retention.bytes=268435456
# The maximum size of a log segment file. When this size is reached a new log segment will be created. # The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=1073741824 log.segment.bytes=268435456
# The interval at which log segments are checked to see if they can be deleted according # The interval at which log segments are checked to see if they can be deleted according
# to the retention policies # to the retention policies
@ -109,9 +109,11 @@ log.retention.check.interval.ms=300000
# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires. # By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction. # If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
log.cleaner.enable=true log.cleaner.enable=true
log.cleaner.threads=2
log.cleaner.dedupe.buffer.size=250000000
#The default cleanup policy for segments beyond the retention window, must be either "delete" or "compact" #The default cleanup policy for segments beyond the retention window, must be either "delete" or "compact"
log.cleanup.policy=compact log.cleanup.policy=delete
#Topic deletion option is disabled by default. To enable it set the server config #Topic deletion option is disabled by default. To enable it set the server config
delete.topic.enable=true delete.topic.enable=true