kyuubi/docker/playground
Cheng Pan a9c2547903
[KYUUBI #3772] Switch default catalog to tpcds in playground
### _Why are the changes needed?_

Kyuubi JDBC driver supports setting catalog in JDBC url since #3516, which is not released yet. To unblock third party apps integrate w/ Kyuubi, I propose to change the default catalog of playground to tpcds, so that the client can see the tables after starting playground immediately.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #3772 from pan3793/catalog-tpcds.

Closes #3772

99670366 [Cheng Pan] load
c590c636 [Cheng Pan] Switch default catalog to tpcds in playground

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-11-07 18:33:47 +08:00
..
image [KYUUBI #3772] Switch default catalog to tpcds in playground 2022-11-07 18:33:47 +08:00
.env [KYUUBI #3473] Add Docker Compose based Kyuubi Playground 2022-09-13 15:00:29 +00:00
build-image.sh [KYUUBI #3473] Add Docker Compose based Kyuubi Playground 2022-09-13 15:00:29 +00:00
compose.yml [KYUUBI #3500] Supply TPC data initialization SQL script for Kyuubi playground 2022-09-20 21:21:54 +08:00
README.md [KYUUBI #3500] Supply TPC data initialization SQL script for Kyuubi playground 2022-09-20 21:21:54 +08:00

Playground

For Users

Setup

  1. Install Docker and Docker Compose;
  2. Go to docker/playground, and use docker compose up to start compose services in the foreground, or use docker compose up -d to run compose services as daemon;

Play

  1. Connect using beeline

docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/';

  1. Connect using DBeaver

Add a Kyuubi datasource with

  • connection url jdbc:hive2://0.0.0.0:10009/
  • username: anonymous
  • password: <empty>
  1. Using built-in dataset

Kyuubi supply some built-in dataset, After the Kyuubi starts, you can run the following command to load the different datasets:

  • For loading TPC-DS tiny dataset to spark_catalog.tpcds_tiny, run docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpcds-tiny.sql
  • For loading TPC-H tiny dataset to spark_catalog.tpch_tiny, run docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/' -f /opt/load_data/load-dataset-tpch-tiny.sql

Access Service

  • MinIO: http://localhost:9001
  • PostgreSQL localhost:5432 (username: postgres, password: postgres)
  • Spark UI: http://localhost:4040 (available after Spark application launching by Kyuubi, port may be 4041, 4042... if you launch more than one Spark applications)

Shutdown

  1. Stop compose services by pressing CTRL+C if they are running on the foreground, or by docker compose down if they are running as daemon;
  2. Remove the stopped containers docker compose rm;

For Maintainers

Build

  1. Build images docker/playground/build-image.sh;
  2. Optional to use buildx to build and publish cross-platform images BUILDX=1 docker/playground/build-image.sh;