You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by je...@apache.org on 2017/06/28 09:09:11 UTC
[incubator-openwhisk] branch master updated: set kafka retention
(#2372)
This is an automated email from the ASF dual-hosted git repository.
jeremiaswerner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 2d20d97 set kafka retention (#2372)
2d20d97 is described below
commit 2d20d9764e8baab9002a8e1b3721901bfbdd4228
Author: RSulzmann <ro...@de.ibm.com>
AuthorDate: Wed Jun 28 11:09:08 2017 +0200
set kafka retention (#2372)
set kafka retention
set kafka retention
---
ansible/group_vars/all | 13 +++++++++++++
ansible/roles/kafka/tasks/deploy.yml | 9 ++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index ce0a98d..f7d5f8d 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -124,6 +124,19 @@ kafka:
port: 9092
ras:
port: 9093
+ topics:
+ completed:
+ segmentBytes: 536870912
+ retentionBytes: "{{ kafka_topics_completed_retentionBytes | default(1073741824) }}"
+ retentionMS: 3600000
+ health:
+ segmentBytes: 536870912
+ retentionBytes: "{{ kafka_topics_health_retentionBytes | default(1073741824) }}"
+ retentionMS: 3600000
+ invoker:
+ segmentBytes: 536870912
+ retentionBytes: "{{ kafka_topics_invoker_retentionBytes | default(1073741824) }}"
+ retentionMS: 172800000
zookeeper:
version: 3.4
diff --git a/ansible/roles/kafka/tasks/deploy.yml b/ansible/roles/kafka/tasks/deploy.yml
index d438d33..d9da440 100644
--- a/ansible/roles/kafka/tasks/deploy.yml
+++ b/ansible/roles/kafka/tasks/deploy.yml
@@ -48,23 +48,22 @@
delay: 5
- name: create the health topic
- shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic {{ item }} --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }}'"
- with_items:
- - health
+ shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic health --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }} --config retention.bytes={{ kafka.topics.health.retentionBytes }} --config retention.ms={{ kafka.topics.health.retentionMS }} --config segment.bytes={{ kafka.topics.health.segmentBytes }}'"
register: command_result
failed_when: "not ('Created topic' in command_result.stdout or 'already exists' in command_result.stdout)"
changed_when: "'Created topic' in command_result.stdout"
- name: create the active-ack topics
- shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic health{{ item.0 }} --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }}'"
+ shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic completed{{ item.0 }} --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }} --config retention.bytes={{ kafka.topics.completed.retentionBytes }} --config retention.ms={{ kafka.topics.completed.retentionMS }} --config segment.bytes={{ kafka.topics.completed.segmentBytes }}'"
with_indexed_items: "{{ groups['controllers'] }}"
register: command_result
failed_when: "not ('Created topic' in command_result.stdout or 'already exists' in command_result.stdout)"
changed_when: "'Created topic' in command_result.stdout"
- name: create the invoker topics
- shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic invoker{{ item.0 }} --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }}'"
+ shell: "docker exec kafka bash -c 'unset JMX_PORT; kafka-topics.sh --create --topic invoker{{ item.0 }} --replication-factor 1 --partitions 1 --zookeeper {{ inventory_hostname }}:{{ zookeeper.port }} --config retention.bytes={{ kafka.topics.invoker.retentionBytes }} --config retention.ms={{ kafka.topics.invoker.retentionMS }} --config segment.bytes={{ kafka.topics.invoker.segmentBytes }}'"
with_indexed_items: "{{ groups['invokers'] }}"
register: command_result
failed_when: "not ('Created topic' in command_result.stdout or 'already exists' in command_result.stdout)"
changed_when: "'Created topic' in command_result.stdout"
+
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].