Browse Source

Kafka should create partitions at start

Closes-bug: #1666888
Change-Id: I80c73fe66eda35d1e48a01e688ffccdb39e96cfc
Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
Illia Polliul 2 years ago
parent
commit
4913edf43f

+ 3
- 0
deployment_scripts/puppet/modules/contrail/manifests/analytics.pp View File

@@ -61,6 +61,7 @@ class contrail::analytics {
61 61
     'DEFAULTS/analytics_config_audit_ttl': value => '-1';
62 62
     'DEFAULTS/analytics_statistics_ttl':   value => '-1';
63 63
     'DEFAULTS/analytics_flow_ttl':         value => '-1';
64
+    'DEFAULTS/partitions':                 value => '30';
64 65
     'DISCOVERY/disc_server_ip':            value => $contrail::contrail_private_vip;
65 66
     'DISCOVERY/disc_server_port':          value => '5998';
66 67
     'REDIS/redis_server_port':             value => '6379';
@@ -80,6 +81,7 @@ class contrail::analytics {
80 81
     'DEFAULT/syslog_port':                value => '-1';
81 82
     'DEFAULT/http_server_port':           value => '8089';
82 83
     'DEFAULT/kafka_broker_list':          value => $contrail::kafka_broker_list;
84
+    'DEFAULT/partitions':                 value => '30';
83 85
     'COLLECTOR/port':                     value => '8086';
84 86
     'DISCOVERY/server':                   value => $contrail::contrail_private_vip;
85 87
     'REDIS/port':                         value => '6379';
@@ -119,6 +121,7 @@ class contrail::analytics {
119 121
     'DEFAULTS/log_file':          value => '/var/log/contrail/contrail-alarm-gen.log';
120 122
     'DEFAULTS/kafka_broker_list': value => $contrail::kafka_broker_list;
121 123
     'DEFAULTS/zk_list':           value => $contrail::zk_server_ip;
124
+    'DEFAULTS/partitions':        value => '30';
122 125
     'DISCOVERY/disc_server_ip':   value => $contrail::contrail_private_vip;
123 126
     'DISCOVERY/disc_server_port': value => '5998';
124 127
     'REDIS/redis_server_port':    value => '6379';

+ 7
- 5
deployment_scripts/puppet/modules/contrail/templates/kafka-server.properties.erb View File

@@ -62,7 +62,7 @@ log.dirs=/tmp/kafka-logs
62 62
 # The default number of log partitions per topic. More partitions allow greater
63 63
 # parallelism for consumption, but this will also result in more files across
64 64
 # the brokers.
65
-num.partitions=1
65
+num.partitions=30
66 66
 
67 67
 # The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
68 68
 # 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
93 93
 # from the end of the log.
94 94
 
95 95
 # The minimum age of a log file to be eligible for deletion
96
-log.retention.hours=168
96
+log.retention.hours=24
97 97
 
98 98
 # A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
99 99
 # segments don't drop below log.retention.bytes.
100
-#log.retention.bytes=1073741824
100
+log.retention.bytes=268435456
101 101
 
102 102
 # The maximum size of a log segment file. When this size is reached a new log segment will be created.
103
-log.segment.bytes=1073741824
103
+log.segment.bytes=268435456
104 104
 
105 105
 # The interval at which log segments are checked to see if they can be deleted according
106 106
 # to the retention policies
@@ -109,9 +109,11 @@ log.retention.check.interval.ms=300000
109 109
 # By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
110 110
 # If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
111 111
 log.cleaner.enable=true
112
+log.cleaner.threads=2
113
+log.cleaner.dedupe.buffer.size=250000000
112 114
 
113 115
 #The default cleanup policy for segments beyond the retention window, must be either "delete" or "compact"
114
-log.cleanup.policy=compact
116
+log.cleanup.policy=delete
115 117
 
116 118
 #Topic deletion option is disabled by default. To enable it set the server config
117 119
 delete.topic.enable=true

Loading…
Cancel
Save