Skip to content

Commit ecee654

Browse files
author
Petter Graff
committed
Minor fixes
1 parent 4d39c89 commit ecee654

File tree

2 files changed

+45
-23
lines changed

2 files changed

+45
-23
lines changed

labs/02-Publish-And-Subscribe/producer.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ If you are on a Mac (or in linux), this should work:
8888
$ docker run -it --rm -v "$(cd "$PWD/../.."; pwd)":/course-root -w "/course-root/$(basename $(cd "$PWD/.."; pwd))/$(basename "$PWD")" -v "$HOME/.m2/repository":/root/.m2/repository maven:3-jdk-11 ./mvnw clean package
8989
```
9090

91-
On a windows machine, you have to replace the `$PWD` with the current directory and the `$HOME` with a directory where you have the `.m2` folder.
91+
On a Windows machine, the `$PWD` and `pwd` commands may not work (unless you run in a Unix-compliant shell). PWD means `print current directory`.
92+
93+
The trick we use above is to map the directory two steps down from the current (which is where the labs are installed on your machine).
94+
So say you had our labs installed in a directory called `/tmp/MyKafkaLabs`, you are now in the directory `/tmp/MyKafkaLabs/kafka-lab/labs/02-Publish-And-Subscribe`.
95+
The script `"$(cd "$PWD/../.."; pwd)"` simply out`puts the path two steps down from here, which would be `/tmp/MyKafkaLabs/kafka-lab`.
96+
97+
The next thing to look out for on a Windows machine is the use of `$HOME`.
98+
This simply means your home directory. You can always replace `$HOME` with your home directory.
9299

93100
7. With the producer now built, run it with the following command:
94101

labs/04-Implement-Topics-And-Partitions/topics-and-partitions.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,31 @@ After a few seconds you should start to see heartbeat messages being produced:
7575

7676
```
7777
...
78-
Scale 1 sent heartbeat at Sat Jun 17 15:43:06 CDT 2017
79-
Scale 2 sent heartbeat at Sat Jun 17 15:43:10 CDT 2017
80-
Heart monitor 2 sent heartbeat at Sat Jun 17 15:43:11 CDT 2017
81-
Heart monitor 5 sent heartbeat at Sat Jun 17 15:43:13 CDT 2017
82-
Scale 5 sent heartbeat at Sat Jun 17 15:43:13 CDT 2017
83-
Scale 6 sent heartbeat at Sat Jun 17 15:43:19 CDT 2017
84-
Scale 1 sent heartbeat at Sat Jun 17 15:43:21 CDT 2017
85-
Heart monitor 6 sent heartbeat at Sat Jun 17 15:43:22 CDT 2017
86-
Heart monitor 1 sent heartbeat at Sat Jun 17 15:43:24 CDT 2017
87-
Scale 4 sent heartbeat at Sat Jun 17 15:43:24 CDT 2017
88-
Heart monitor 2 sent heartbeat at Sat Jun 17 15:43:26 CDT 2017
89-
Heart monitor 7 sent heartbeat at Sat Jun 17 15:43:27 CDT 2017
90-
Heart monitor 5 sent heartbeat at Sat Jun 17 15:43:28 CDT 2017
91-
Scale 5 sent heartbeat at Sat Jun 17 15:43:28 CDT 2017
92-
Scale 6 sent heartbeat at Sat Jun 17 15:43:34 CDT 2017
78+
2022-08-21T19:20:16.210887Z
79+
2022-08-21T19:20:16.638141Z
80+
2022-08-21T19:20:20.24739Z
81+
2022-08-21T19:20:20.729122Z
82+
2022-08-21T19:20:23.489956Z
83+
2022-08-21T19:20:24.938794Z
84+
2022-08-21T19:20:31.207251Z
85+
2022-08-21T19:20:33.075107Z
86+
2022-08-21T19:20:33.705245Z
87+
2022-08-21T19:20:35.372573Z
88+
2022-08-21T19:20:35.882868Z
89+
2022-08-21T19:20:38.202446Z
90+
2022-08-21T19:20:40.126325Z
91+
2022-08-21T19:20:46.639412Z
92+
2022-08-21T19:20:50.373135Z
93+
2022-08-21T19:20:51.07784Z
94+
2022-08-21T19:20:53.202233Z
95+
2022-08-21T19:20:53.491849Z
96+
2022-08-21T19:21:01.209427Z
97+
2022-08-21T19:21:01.639625Z
98+
2022-08-21T19:21:03.074633Z
99+
2022-08-21T19:21:05.252201Z
100+
2022-08-21T19:21:06.076764Z
101+
2022-08-21T19:21:08.203343Z
102+
2022-08-21T19:21:08.490369Z
93103
...
94104
```
95105

@@ -120,12 +130,18 @@ You should now see a set of output similar to this:
120130

121131
```
122132
...
123-
Received heartbeat from: Scale 6 value: 2022-02-07T15:47:53.049305Z
124-
Received heartbeat from: Scale 4 value: 2022-02-07T15:47:56.444218Z
125-
Received heartbeat from: Heart monitor 7 value: 2022-02-07T15:47:58.672334Z
126-
Received heartbeat from: Heart monitor 4 value: 2022-02-07T15:48:00.970748Z
127-
Received heartbeat from: Scale 7 value: 2022-02-07T15:48:01.37685Z
128-
Received heartbeat from: Heart monitor 3 value: 2022-02-07T15:48:01.400834Z
133+
Checking devices...
134+
Finished checking devices...
135+
Received heartbeat from: Scale 3 value: 2022-08-21T19:21:24.940407Z
136+
Received heartbeat from: Scale 1 value: 2022-08-21T19:21:31.638733Z
137+
Received heartbeat from: Heart monitor 4 value: 2022-08-21T19:21:34.757311Z
138+
Received heartbeat from: Scale 6 value: 2022-08-21T19:21:35.24983Z
139+
Received heartbeat from: Heart monitor 2 value: 2022-08-21T19:21:35.373978Z
140+
Received heartbeat from: Heart monitor 1 value: 2022-08-21T19:21:35.726856Z
141+
Received heartbeat from: Heart monitor 7 value: 2022-08-21T19:21:36.079161Z
142+
Received heartbeat from: Heart monitor 3 value: 2022-08-21T19:21:46.206831
143+
ZChecking devices...
144+
Finished checking devices...
129145
...
130146
```
131147

@@ -144,7 +160,6 @@ For example:
144160

145161
```
146162
...
147-
Scale 7 offline since Sat Jun 17 16:58:10 CDT 2017
148163
Scale 7 is back online
149164
Heart monitor 2 offline since Sat Jun 17 16:59:41 CDT 2017
150165
Heart monitor 2 is back online

0 commit comments

Comments
 (0)