This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put every Kafka mirror in a systemd unit for better management.
- Loading branch information
Showing
12 changed files
with
111 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
#!/bin/bash | ||
# Arguments: | ||
# 1-site | ||
# 2-topic name | ||
#!/usr/bin/env bash | ||
|
||
SITE=$1 | ||
TOPIC=$2 | ||
|
||
/opt/kafka/bin/kafka-run-class.sh kafka.tools.MirrorMaker --consumer.config /usr/bin/dcm/${SITE}_consumer.config --num.streams 1 --producer.config /usr/bin/dcm/producer.config --whitelist \'${TOPIC}\' & | ||
/opt/kafka/bin/kafka-run-class.sh \ | ||
kafka.tools.MirrorMaker \ | ||
--abort.on.send.failure "true" \ | ||
--consumer.config "/usr/bin/dcm/${SITE}_consumer.config" \ | ||
--num.streams 4 \ | ||
--producer.config /usr/bin/dcm/producer.config \ | ||
--whitelist '^.*\.application_metric\..*$,^.*\.infrastructure_metric\..*$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bootstrap.servers=BROKER_IP:9092 | ||
group.id=dp-MirrorMaker-group | ||
exclude.internal.topics=true | ||
#mirror.topics.whitelist=.* | ||
client.id=mirror_maker_consumer | ||
enable.auto.commit=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bootstrap.servers=BROKER_IP:9092 | ||
group.id=dp-MirrorMaker-group | ||
exclude.internal.topics=true | ||
#mirror.topics.whitelist=.* | ||
client.id=mirror_maker_consumer | ||
enable.auto.commit=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bootstrap.servers=BROKER_IP:9092 | ||
group.id=dp-MirrorMaker-group | ||
exclude.internal.topics=true | ||
#mirror.topics.whitelist=.* | ||
client.id=mirror_maker_consumer | ||
enable.auto.commit=false |
12 changes: 12 additions & 0 deletions
12
roles/preparation/files/kafka-mirror-services/kafka-mirror-french-site.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Kafka MirrorMaker for French Site | ||
PartOf=dcm.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/dcm/create_kafka_mirror.sh french | ||
TimeoutSec=10 | ||
Restart=on-failure | ||
RestartSec=1 | ||
|
||
[Install] | ||
WantedBy=default.target |
12 changes: 12 additions & 0 deletions
12
roles/preparation/files/kafka-mirror-services/kafka-mirror-greek-site.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Kafka MirrorMaker for Greek Site | ||
PartOf=dcm.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/dcm/create_kafka_mirror.sh greek | ||
TimeoutSec=10 | ||
Restart=on-failure | ||
RestartSec=1 | ||
|
||
[Install] | ||
WantedBy=default.target |
12 changes: 12 additions & 0 deletions
12
roles/preparation/files/kafka-mirror-services/kafka-mirror-italian-site.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Kafka MirrorMaker for Italian Site | ||
PartOf=dcm.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/dcm/create_kafka_mirror.sh italian | ||
TimeoutSec=10 | ||
Restart=on-failure | ||
RestartSec=1 | ||
|
||
[Install] | ||
WantedBy=default.target |
12 changes: 12 additions & 0 deletions
12
roles/preparation/files/kafka-mirror-services/kafka-mirror-spanish-site.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Kafka MirrorMaker for Spanish Site | ||
PartOf=dcm.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/dcm/create_kafka_mirror.sh spanish | ||
TimeoutSec=10 | ||
Restart=on-failure | ||
RestartSec=1 | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
bootstrap.servers=BROKER_IP:9092 | ||
acks=1 | ||
acks=-1 | ||
batch.size=100 | ||
client.id=mirror_maker_producer | ||
|
||
max.in.flight.requests.per.connection=1 | ||
retries=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bootstrap.servers=BROKER_IP:9092 | ||
group.id=dp-MirrorMaker-group | ||
exclude.internal.topics=true | ||
#mirror.topics.whitelist=.* | ||
client.id=mirror_maker_consumer | ||
enable.auto.commit=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters