@@ -81,7 +81,9 @@ docker run \
8181 --name coordinator-server \
8282 --network=fluss-demo \
8383 --env FLUSS_PROPERTIES=" zookeeper.address: zookeeper:2181
84- bind.listeners: FLUSS://coordinator-server:9123" \
84+ bind.listeners: FLUSS://coordinator-server:9123
85+ advertised.listeners: FLUSS://localhost:9123
86+ " \
8587 -p 9123:9123 \
8688 -d fluss/fluss:$FLUSS_VERSION $ coordinatorServer
8789```
@@ -101,6 +103,7 @@ docker run \
101103 --network=fluss-demo \
102104 --env FLUSS_PROPERTIES=" zookeeper.address: zookeeper:2181
103105bind.listeners: FLUSS://tablet-server:9124
106+ advertised.listeners: FLUSS://localhost:9124
104107tablet-server.id: 0
105108data.dir: /tmp/fluss/data
106109remote.data.dir: /tmp/fluss/remote-data" \
@@ -121,6 +124,7 @@ docker run \
121124 --network=fluss-demo \
122125 --env FLUSS_PROPERTIES=" zookeeper.address: zookeeper:2181
123126bind.listeners: FLUSS://tablet-server-0:9124
127+ advertised.listeners: FLUSS://localhost:9124
124128tablet-server.id: 0
125129data.dir: /tmp/fluss/data/tablet-server-0
126130remote.data.dir: /tmp/fluss/remote-data" \
@@ -136,6 +140,7 @@ docker run \
136140 --network=fluss-demo \
137141 --env FLUSS_PROPERTIES=" zookeeper.address: zookeeper:2181
138142bind.listeners: FLUSS://tablet-server-1:9125
143+ advertised.listeners: FLUSS://localhost:9125
139144tablet-server.id: 1
140145data.dir: /tmp/fluss/data/tablet-server-1
141146remote.data.dir: /tmp/fluss/remote-data" \
@@ -151,6 +156,7 @@ docker run \
151156 --network=fluss-demo \
152157 --env FLUSS_PROPERTIES=" zookeeper.address: zookeeper:2181
153158bind.listeners: FLUSS://tablet-server-2:9126
159+ advertised.listeners: FLUSS://localhost:9126
154160tablet-server.id: 2
155161data.dir: /tmp/fluss/data/tablet-server-2
156162remote.data.dir: /tmp/fluss/remote-data" \
@@ -167,67 +173,6 @@ Run the below command to check the Fluss cluster status:
167173docker container ls -a
168174```
169175
170- ### Interacting with Fluss
171-
172- After the Fluss cluster is started, you can use ** Fluss Client** (e.g., Flink SQL Client) to interact with Fluss.
173- The following subsections will show you how to use 'Docker' to build a Flink cluster and use ** Flink SQL Client**
174- to interact with Fluss.
175-
176- #### Start Flink Cluster
177-
178- 1 . Start jobManager
179-
180- ``` bash
181- docker run \
182- --name jobmanager \
183- --network=fluss-demo \
184- --env FLINK_PROPERTIES=" jobmanager.rpc.address: jobmanager" \
185- -p 8083:8081 \
186- --volume shared-tmpfs:/tmp/fluss \
187- -d fluss/quickstart-flink:1.20-$FLUSS_VERSION_SHORT $ jobmanager
188- ```
189-
190- 2 . Start taskManager
191-
192- ``` bash
193- docker run \
194- --name taskmanager \
195- --network=fluss-demo \
196- --env FLINK_PROPERTIES=" jobmanager.rpc.address: jobmanager" \
197- --volume shared-tmpfs:/tmp/fluss \
198- -d fluss/quickstart-flink:1.20-$FLUSS_VERSION_SHORT $ taskmanager
199- ```
200-
201- #### Enter into SQL-Client
202- First, use the following command to enter pod:
203- ``` shell
204- docker exec -it jobmanager /bin/bash
205- ```
206-
207- Then, use the following command to enter the Flink SQL CLI Container:
208- ``` shell
209- ./sql-client
210- ```
211-
212- #### Create Fluss Catalog
213-
214- Use the following SQL to create a Fluss catalog:
215- ``` sql title="Flink SQL"
216- CREATE CATALOG fluss_catalog WITH (
217- ' type' = ' fluss' ,
218- ' bootstrap.servers' = ' coordinator-server:9123'
219- );
220- ```
221-
222- ``` sql title="Flink SQL"
223- USE CATALOG fluss_catalog;
224- ```
225-
226- #### Do more with Fluss
227-
228- After the catalog is created, you can use Flink SQL Client to do more with Fluss, for example, create a table, insert data, query data, etc.
229- More details please refer to [ Flink Getting started] ( engine-flink/getting-started.md )
230-
231176## Deploy with Docker Compose
232177
233178The following is a brief overview of how to quickly create a complete Fluss testing cluster
@@ -249,8 +194,12 @@ services:
249194 - |
250195 FLUSS_PROPERTIES=
251196 zookeeper.address: zookeeper:2181
252- bind.listeners: FLUSS://coordinator-server:9123
197+ bind.listeners: INTERNAL://coordinator-server:0, CLIENT://coordinator-server:9123
198+ advertised.listeners: CLIENT://localhost:9123
199+ internal.listener.name: INTERNAL
253200 remote.data.dir: /tmp/fluss/remote-data
201+ ports :
202+ - " 9123:9123"
254203 tablet-server :
255204 image : fluss/fluss:$FLUSS_VERSION$
256205 command : tabletServer
@@ -260,11 +209,15 @@ services:
260209 - |
261210 FLUSS_PROPERTIES=
262211 zookeeper.address: zookeeper:2181
263- bind.listeners: FLUSS://tablet-server:9123
212+ bind.listeners: INTERNAL://tablet-server:0, CLIENT://tablet-server:9123
213+ advertised.listeners: CLIENT://localhost:9124
214+ internal.listener.name: INTERNAL
264215 tablet-server.id: 0
265216 kv.snapshot.interval: 0s
266217 data.dir: /tmp/fluss/data
267218 remote.data.dir: /tmp/fluss/remote-data
219+ ports :
220+ - " 9124:9123"
268221 volumes :
269222 - shared-tmpfs:/tmp/fluss
270223 zookeeper :
@@ -294,8 +247,12 @@ services:
294247 - |
295248 FLUSS_PROPERTIES=
296249 zookeeper.address: zookeeper:2181
297- bind.listeners: FLUSS://coordinator-server:9123
250+ bind.listeners: INTERNAL://coordinator-server:0, CLIENT://coordinator-server:9123
251+ advertised.listeners: CLIENT://localhost:9123
252+ internal.listener.name: INTERNAL
298253 remote.data.dir: /tmp/fluss/remote-data
254+ ports:
255+ - "9123:9123"
299256 tablet-server-0:
300257 image: fluss/fluss:$FLUSS_VERSION$
301258 command: tabletServer
@@ -305,11 +262,15 @@ services:
305262 - |
306263 FLUSS_PROPERTIES=
307264 zookeeper.address: zookeeper:2181
308- bind.listeners: FLUSS://tablet-server-0:9123
265+ bind.listeners: INTERNAL://tablet-server-0:0, CLIENT://tablet-server-0:9123
266+ advertised.listeners: CLIENT://localhost:9124
267+ internal.listener.name: INTERNAL
309268 tablet-server.id: 0
310269 kv.snapshot.interval: 0s
311270 data.dir: /tmp/fluss/data/tablet-server-0
312271 remote.data.dir: /tmp/fluss/remote-data
272+ ports:
273+ - "9124:9123"
313274 volumes:
314275 - shared-tmpfs:/tmp/fluss
315276 tablet-server-1:
@@ -321,11 +282,15 @@ services:
321282 - |
322283 FLUSS_PROPERTIES=
323284 zookeeper.address: zookeeper:2181
324- bind.listeners: FLUSS://tablet-server-1:9123
285+ bind.listeners: INTERNAL://tablet-server-1:0, CLIENT://tablet-server-1:9123
286+ advertised.listeners: CLIENT://localhost:9125
287+ internal.listener.name: INTERNAL
325288 tablet-server.id: 1
326289 kv.snapshot.interval: 0s
327290 data.dir: /tmp/fluss/data/tablet-server-1
328291 remote.data.dir: /tmp/fluss/remote-data
292+ ports:
293+ - "9125:9123"
329294 volumes:
330295 - shared-tmpfs:/tmp/fluss
331296 tablet-server-2:
@@ -337,11 +302,15 @@ services:
337302 - |
338303 FLUSS_PROPERTIES=
339304 zookeeper.address: zookeeper:2181
340- bind.listeners: FLUSS://tablet-server-2:9123
305+ bind.listeners: INTERNAL://tablet-server-2:0, CLIENT://tablet-server-2:9123
306+ advertised.listeners: CLIENT://localhost:9126
307+ internal.listener.name: INTERNAL
341308 tablet-server.id: 2
342309 kv.snapshot.interval: 0s
343310 data.dir: /tmp/fluss/data/tablet-server-2
344311 remote.data.dir: /tmp/fluss/remote-data
312+ ports:
313+ - "9126:9123"
345314 volumes:
346315 - shared-tmpfs:/tmp/fluss
347316 zookeeper:
@@ -367,127 +336,42 @@ Run the below command to check the container status:
367336docker container ls -a
368337` ` `
369338
370- # ## Interacting with Fluss
339+ # # Interacting with Fluss
371340
372- If you want to interact with this Fluss cluster, you can change the `docker-compose.yml` file to add a Flink cluster.
373- The changed `docker-compose.yml` file is as follows :
341+ After the Fluss cluster is started, you can use **Fluss Client** (e.g., Flink SQL Client) to interact with Fluss.
342+ The following subsections will show you how to use 'Docker' to build a Flink cluster and use **Flink SQL Client**
343+ to interact with Fluss.
374344
375- ` ` ` yaml
376- services:
377- coordinator-server:
378- image: fluss/fluss:$FLUSS_VERSION$
379- command: coordinatorServer
380- depends_on:
381- - zookeeper
382- environment:
383- - |
384- FLUSS_PROPERTIES=
385- zookeeper.address: zookeeper:2181
386- bind.listeners: FLUSS://coordinator-server:9123
387- remote.data.dir: /tmp/fluss/remote-data
388- tablet-server-0:
389- image: fluss/fluss:$FLUSS_VERSION$
390- command: tabletServer
391- depends_on:
392- - coordinator-server
393- environment:
394- - |
395- FLUSS_PROPERTIES=
396- zookeeper.address: zookeeper:2181
397- bind.listeners: FLUSS://tablet-server-0:9123
398- tablet-server.id: 0
399- kv.snapshot.interval: 0s
400- data.dir: /tmp/fluss/data/tablet-server-0
401- remote.data.dir: /tmp/fluss/remote-data
402- volumes:
403- - shared-tmpfs:/tmp/fluss
404- tablet-server-1:
405- image: fluss/fluss:$FLUSS_VERSION$
406- command: tabletServer
407- depends_on:
408- - coordinator-server
409- environment:
410- - |
411- FLUSS_PROPERTIES=
412- zookeeper.address: zookeeper:2181
413- bind.listeners: FLUSS://tablet-server-1:9123
414- tablet-server.id: 1
415- kv.snapshot.interval: 0s
416- data.dir: /tmp/fluss/data/tablet-server-1
417- remote.data.dir: /tmp/fluss/remote-data
418- volumes:
419- - shared-tmpfs:/tmp/fluss
420- tablet-server-2:
421- image: fluss/fluss:$FLUSS_VERSION$
422- command: tabletServer
423- depends_on:
424- - coordinator-server
425- environment:
426- - |
427- FLUSS_PROPERTIES=
428- zookeeper.address: zookeeper:2181
429- bind.listeners: FLUSS://tablet-server-2:9123
430- tablet-server.id: 2
431- kv.snapshot.interval: 0s
432- data.dir: /tmp/fluss/data/tablet-server-2
433- remote.data.dir: /tmp/fluss/remote-data
434- volumes:
435- - shared-tmpfs:/tmp/fluss
436- zookeeper:
437- restart: always
438- image: zookeeper:3.9.2
439- jobmanager:
440- image: fluss/quickstart-flink:1.20-$FLUSS_VERSION_SHORT$
441- ports:
442- - "8083:8081"
443- command: jobmanager
444- environment:
445- - |
446- FLINK_PROPERTIES=
447- jobmanager.rpc.address: jobmanager
448- volumes:
449- - shared-tmpfs:/tmp/fluss
450- taskmanager:
451- image: fluss/quickstart-flink:1.20-$FLUSS_VERSION_SHORT$
452- depends_on:
453- - jobmanager
454- command: taskmanager
455- environment:
456- - |
457- FLINK_PROPERTIES=
458- jobmanager.rpc.address: jobmanager
459- volumes:
460- - shared-tmpfs:/tmp/fluss
345+ # ### Start Flink Cluster
346+ You can start a Flink standalone cluster refer to [Flink Environment Preparation](engine-flink/getting-started.md#preparation-when-using-flink-sql-client)
461347
462- volumes:
463- shared-tmpfs:
464- driver: local
465- driver_opts:
466- type: "tmpfs"
467- device: "tmpfs"
348+ **Note**: Make sure the [Fluss connector jar](/downloads/) already has copied to the `lib` directory of your Flink home.
349+ ` ` ` shell
350+ bin/start-cluster.sh
468351` ` `
469- Save the `docker-compose.yaml` script and execute the `docker-compose up -d` command in the same directory to create the cluster.
470352
471- # ### Enter into SQL-Client
472- First, use the following command to enter the Flink SQL CLI Container :
353+
354+ # ## Enter into SQL-Client
355+ Use the following command to enter the Flink SQL CLI Container :
473356` ` ` shell
474- docker compose exec jobmanager ./sql-client
357+ ./sql-client
475358` ` `
476359
477- # ### Create Fluss Catalog
360+ # ## Create Fluss Catalog
361+
478362Use the following SQL to create a Fluss catalog :
479363` ` ` sql title="Flink SQL"
480364CREATE CATALOG fluss_catalog WITH (
481365 'type' = 'fluss',
482- 'bootstrap.servers' = 'coordinator-server :9123'
366+ 'bootstrap.servers' = 'localhost :9123'
483367);
484368` ` `
485369
486370` ` ` sql title="Flink SQL"
487371USE CATALOG fluss_catalog;
488372` ` `
489373
490- # ### Do more with Fluss
374+ # ## Do more with Fluss
491375
492376After the catalog is created, you can use Flink SQL Client to do more with Fluss, for example, create a table, insert data, query data, etc.
493- More details please refer to [Flink Getting started](engine-flink/getting-started.md)
377+ More details please refer to [Flink Getting started](engine-flink/getting-started.md)
0 commit comments