Skip to content

Commit 665744f

Browse files
committed
Updated readme for Gemfire example.
1 parent af78bdc commit 665744f

File tree

1 file changed

+162
-8
lines changed

1 file changed

+162
-8
lines changed

examples/gemfire/demo/README.md

Lines changed: 162 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd demo
2222
```
2323

2424
## Setup Gemfire database (Source)
25-
<b>_PostgreSQL on Docker_</b>
25+
<b>_Apache Geode on Docker_</b>
2626
<br>Execute [setup_gemfire.sh](setup_gemfire.sh)</br>
2727
```bash
2828
demo$ ./setup_gemfire.sh
@@ -32,10 +32,10 @@ demo$ ./setup_gemfire.sh
3232
<p>
3333

3434
```bash
35-
demo$ sudo docker ps -a | grep gemfire
35+
demo$ docker ps -a | grep gemfire
3636
beb0205a037f apachegeode/geode:1.12.9 "sh -c /geode/script…" 4 hours ago Up 4 hours 0.0.0.0:1099->1099/tcp, 0.0.0.0:7070->7070/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:10334->10334/tcp, 0.0.0.0:40404->40404/tcp gemfire-1.12.9-virag-WPG6PH3FV5
3737

38-
demo$ sudo docker exec -it gemfire-1.12.9-$(hostname) sh -c "gfsh version"
38+
demo$ docker exec -it gemfire-1.12.9-$(hostname) sh -c "gfsh version"
3939
1.12.9
4040
```
4141
</p>
@@ -56,7 +56,7 @@ The above script will create a 1-node Redis Enterprise cluster in a docker conta
5656
<p>
5757

5858
```bash
59-
demo$ docker run \
59+
docker run \
6060
-it --rm --privileged=true \
6161
--name redis-connect-$(hostname) \
6262
-v $(pwd)/config:/opt/redislabs/redis-connect/config \
@@ -118,6 +118,42 @@ redislabs/redis-connect start
118118
<p>
119119

120120
```bash
121+
-------------------------------
122+
Starting redis-connect v0.10.1.5 Instance using JAVA 11.0.19 on docker-desktop started by root in /opt/redislabs/redis-connect/bin
123+
Loading redis-connect Instance configuration from /opt/redislabs/redis-connect/config/jobmanager.properties
124+
Instance classpath /opt/redislabs/redis-connect/lib/*:/opt/redislabs/redis-connect/extlib/*
125+
Check redis-connect-manager-<PID>.log for cluster-level information, redis-connect-heartbeat-<PID>.log for heartbeat-lease renewals, and redis-connect-<PID>.log for the job-level information
126+
07:11:09.184 [main] INFO redis-connect-manager - ----------------------------------------------------------------------------------------------------------------------------
127+
/####### /## /## /###### /##
128+
| ##__ ## | ## |__/ /##__ ## | ##
129+
| ## \ ## /###### /####### /## /####### | ## \__/ /###### /####### /####### /###### /####### /######
130+
| #######/ /##__ ## /##__ ##| ## /##_____/ | ## /##__ ##| ##__ ##| ##__ ## /##__ ## /##_____/|_ ##_/
131+
| ##__ ##| ########| ## | ##| ##| ###### | ## | ## \ ##| ## \ ##| ## \ ##| ########| ## | ##
132+
| ## \ ##| ##_____/| ## | ##| ## \____ ## | ## ##| ## | ##| ## | ##| ## | ##| ##_____/| ## | ## /##
133+
| ## | ##| #######| #######| ## /#######/ | ######/| ######/| ## | ##| ## | ##| #######| ####### | ####/
134+
|__/ |__/ \_______/ \_______/|__/|_______/ \______/ \______/ |__/ |__/|__/ |__/ \_______/ \_______/ \___/ v0.10.1
135+
Powered by Redis Enterprise
136+
07:11:14.190 [main] INFO redis-connect-manager - ----------------------------------------------------------------------------------------------------------------------------
137+
07:11:14.930 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: JobManager
138+
07:11:14.934 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: JobReaper
139+
07:11:14.939 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: JobClaimer
140+
07:11:14.943 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: JobOrchestrator
141+
07:11:14.947 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: HeartbeatManager
142+
07:11:14.949 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: MetricsReporter
143+
07:11:14.951 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: CredentialsRotationEventListener
144+
07:11:14.953 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully established Redis connection with ClientId: JobManager ConnectionId: ChangeEventQueue
145+
07:11:14.986 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully created Job Claim Assignment Stream and Consumer Group
146+
07:11:14.988 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully started JobManager service
147+
07:11:14.988 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully started JobReaper service
148+
07:11:14.989 [main] INFO redis-connect-manager - Instance: 30@docker-desktop successfully started JobClaimer service
149+
07:11:14.990 [main] INFO redis-connect-manager - Instance: 30@docker-desktop Metrics are not enabled so MetricsReporter threadpool will not be instantiated
150+
07:11:16.630 [main] INFO redis-connect-manager - Instance: 30@docker-desktop started Redis Connect REST API listening on ["http-nio-8282"]
151+
07:11:16.630 [main] INFO redis-connect-manager - ----------------------------------------------------------------------------------------------------------------------------
152+
07:11:16.630 [main] INFO redis-connect-manager -
153+
07:11:16.630 [main] INFO redis-connect-manager - Started Redis Connect Instance v0.10.1
154+
07:11:16.630 [main] INFO redis-connect-manager -
155+
07:11:16.630 [main] INFO redis-connect-manager - ----------------------------------------------------------------------------------------------------------------------------
156+
07:11:24.997 [JOB_MANAGER_THREADPOOL-2] INFO redis-connect-manager - Instance: 30@docker-desktop was successfully elected Redis Connect cluster leader
121157
```
122158

123159
</p>
@@ -139,14 +175,113 @@ redislabs/redis-connect start
139175

140176
### Initial Loader Steps
141177

142-
<details><summary><b>INSERT few records into postgres table (source)</b></summary>
178+
<details><summary><b>INSERT few records into Gemfire region (source)</b></summary>
143179
<p>
144-
You can also use <a href="https://github.com/redis-field-engineering/redis-connect-crud-loader#redis-connect-crud-loader">redis-connect-crud-loader</a> to insert load large amount of data using a csv or sql file.
145180

146181
```bash
147182
demo$ ./load.sh
148183

184+
Inserting records in session region..
185+
186+
(1) Executing - connect --locator localhost[10334]
187+
188+
Connecting to Locator at [host=localhost, port=10334] ..
189+
Connecting to Manager at [host=beb0205a037f, port=1099] ..
190+
Successfully connected to: [host=beb0205a037f, port=1099]
191+
192+
You are connected to a cluster of version: 1.12.9
193+
194+
195+
(2) Executing - put --key=(Key1) --value=(Value1) --region=/session
196+
197+
Result : true
198+
Key Class : java.lang.String
199+
Key : {Key1}
200+
Value Class : java.lang.String
201+
Old Value : "{UpdatedValue1}"
202+
203+
204+
(3) Executing - put --key=(Key2) --value=(Value2) --region=/session
205+
206+
Result : true
207+
Key Class : java.lang.String
208+
Key : {Key2}
209+
Value Class : java.lang.String
210+
Old Value : "{UpdatedValue2}"
211+
212+
213+
(4) Executing - put --key=(Key3) --value=(Value3) --region=/session
214+
215+
Result : true
216+
Key Class : java.lang.String
217+
Key : {Key3}
218+
Value Class : java.lang.String
219+
Old Value : "{Value3}"
220+
221+
222+
(5) Executing - put --key=(Key4) --value=(Value4) --region=/session
223+
224+
Result : true
225+
Key Class : java.lang.String
226+
Key : {Key4}
227+
Value Class : java.lang.String
228+
Old Value : "{Value4}"
229+
230+
231+
(6) Executing - put --key=(Key5) --value=(Value5) --region=/session
232+
233+
Result : true
234+
Key Class : java.lang.String
235+
Key : {Key5}
236+
Value Class : java.lang.String
237+
Old Value : "{Value5}"
238+
149239

240+
(7) Executing - put --key=(Key6) --value=(Value6) --region=/session
241+
242+
Result : true
243+
Key Class : java.lang.String
244+
Key : {Key6}
245+
Value Class : java.lang.String
246+
Old Value : "{Value6}"
247+
248+
249+
(8) Executing - put --key=(Key7) --value=(Value7) --region=/session
250+
251+
Result : true
252+
Key Class : java.lang.String
253+
Key : {Key7}
254+
Value Class : java.lang.String
255+
Old Value : null
256+
257+
258+
(9) Executing - put --key=(Key8) --value=(Value8) --region=/session
259+
260+
Result : true
261+
Key Class : java.lang.String
262+
Key : {Key8}
263+
Value Class : java.lang.String
264+
Old Value : "{Value8}"
265+
266+
267+
(10) Executing - put --key=(Key9) --value=(Value9) --region=/session
268+
269+
Result : true
270+
Key Class : java.lang.String
271+
Key : {Key9}
272+
Value Class : java.lang.String
273+
Old Value : null
274+
275+
276+
(11) Executing - put --key=(Key10) --value=(Value10) --region=/session
277+
278+
Result : true
279+
Key Class : java.lang.String
280+
Key : {Key10}
281+
Value Class : java.lang.String
282+
Old Value : "{Value10}"
283+
284+
done
150285
```
151286

152287
</p>
@@ -189,13 +324,32 @@ demo$
189324

190325
Expected output: `[{"jobId":"{connect}:job:cdc-job","jobName":"cdc-job","jobStatus":"CLAIMED","jobOwner":"30@virag-cdc","jobType":"STREAM"}]`
191326

192-
<details><summary><b>INSERT a record into postgres table (source)</b></summary>
327+
<details><summary><b>INSERT a record into Gemfire region (source)</b></summary>
193328
<p>
194329

195330
```bash
196331
demo$ ./insert.sh
197332

333+
Inserting records in session region..
334+
335+
(1) Executing - connect --locator localhost[10334]
336+
337+
Connecting to Locator at [host=localhost, port=10334] ..
338+
Connecting to Manager at [host=beb0205a037f, port=1099] ..
339+
Successfully connected to: [host=beb0205a037f, port=1099]
198340

341+
You are connected to a cluster of version: 1.12.9
342+
343+
344+
(2) Executing - put --key=(Key11) --value=(Value11) --region=/session
345+
346+
Result : true
347+
Key Class : java.lang.String
348+
Key : {Key11}
349+
Value Class : java.lang.String
350+
Old Value : "{Value11}"
351+
352+
done
199353
```
200354

201355
</p>
@@ -205,7 +359,7 @@ demo$ ./insert.sh
205359
<p>
206360

207361
```bash
208-
demo$ sudo docker exec -it re-node1 bash -c 'redis-cli -p 12000 idx_emp "@fname:allen"'
362+
demo$
209363

210364
```
211365

0 commit comments

Comments
 (0)