-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
47 changes: 47 additions & 0 deletions
47
A19 - Kafka/1-présentationKAFKA/2- ATLIER #1 KAFKA-WINDOWS.txt
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,47 @@ | ||
*********************************** | ||
**************ATLIER KAFKA********* | ||
*********************************** | ||
*****1- Démarrez ZOOKEEPER | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\zookeeper-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\zookeeper.properties | ||
|
||
*****2- Démarrez le serveur KAFKA | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\kafka-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\server.properties | ||
|
||
*****3- Création d'un premier topic (ouvrir CMD dans windows) | ||
kafka-topics --bootstrap-server localhost:9092 --topic justine --create --partitions 1 --replication-factor 1 | ||
|
||
*****4- Création de plusieurs topics (ouvrir CMD dans windows) | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfirst --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mysecond --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mythird --create --partitions 1 --replication-factor 1 | ||
|
||
*****5- lister les topics | ||
kafka-topics --bootstrap-server localhost:9092 -list | ||
|
||
*****6- décrire un topic spécéfique | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic justine | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic myfirst | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mysecond | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mythird | ||
|
||
*****7- Création d'un 4ème topic avec un facteur de répartition =3 (ouvrir CMD dans windows) | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfourth --create --partitions 3 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic myfourth | ||
|
||
|
||
*****8- Création d'un 5ème topic avec un facteur de réplication =3 (ouvrir CMD dans windows) | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfifth --create --partitions 1 --replication-factor 3 | ||
|
||
|
||
***Toutes les commandes | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\zookeeper-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\zookeeper.properties | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\kafka-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\server.properties | ||
kafka-topics --bootstrap-server localhost:9092 --topic justine --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfirst --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mysecond --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mythird --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 -list | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic justine | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic myfirst | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mysecond | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mythird |
47 changes: 47 additions & 0 deletions
47
A19 - Kafka/1-présentationKAFKA/3- ATLIER #1 KAFKA-LINUX2.txt
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,47 @@ | ||
*********************************** | ||
**************ATLIER KAFKA********* | ||
*********************************** | ||
*****1- Démarrez ZOOKEEPER | ||
bin/zookeeper-server-start.sh config/zookeeper.properties | ||
|
||
*****2- Démarrez le serveur KAFKA | ||
bin/kafka-server-start.sh config/server.properties | ||
|
||
*****3- Création d'un premier topic (ouvrir CMD dans windows) | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --topic justine --create --partitions 1 --replication-factor 1 | ||
|
||
*****4- Création de plusieurs topics (ouvrir CMD dans windows) | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --topic myfirst --create --partitions 1 --replication-factor 1 | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --topic mysecond --create --partitions 1 --replication-factor 1 | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --topic mythird --create --partitions 1 --replication-factor 1 | ||
|
||
*****5- lister les topics | ||
./kafka-topics.sh --bootstrap-server localhost:9092 -list | ||
|
||
*****6- décrire un topic spécéfique | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic justine | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic myfirst | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic mysecond | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic mythird | ||
|
||
*****7- Création d'un 4ème topic avec un facteur de répartition =3 (ouvrir CMD dans windows) | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --topic myfourth --create --partitions 3 --replication-factor 1 | ||
./kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic myfourth | ||
|
||
|
||
*****8- Création d'un 5ème topic avec un facteur de réplication =3 (ouvrir CMD dans windows) | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfifth --create --partitions 1 --replication-factor 3 | ||
|
||
|
||
***Toutes les commandes | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\zookeeper-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\zookeeper.properties | ||
C:\HADOOP\kafka_2.12-3.5.0\bin\windows\kafka-server-start.bat C:\HADOOP\kafka_2.12-3.5.0\config\server.properties | ||
kafka-topics --bootstrap-server localhost:9092 --topic justine --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic myfirst --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mysecond --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 --topic mythird --create --partitions 1 --replication-factor 1 | ||
kafka-topics --bootstrap-server localhost:9092 -list | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic justine | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic myfirst | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mysecond | ||
kafka-topics --bootstrap-server localhost:9092 --describe --topic mythird |