kyuubi/docker/playground
yikf 66f28efbf7
[KYUUBI #3500] Supply TPC data initialization SQL script for Kyuubi playground
### _Why are the changes needed?_

Fix https://github.com/apache/incubator-kyuubi/issues/3500

Supply a SQL script to create TPC tables in spark_catalog and load tiny scale data.

### _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

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

Closes #3526 from Yikf/playgroud-tiny-dataset.

Closes #3500

8d06322d [yikf] supply tpcds tiny dataset

Authored-by: yikf <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2022-09-20 21:21:54 +08:00
..
image [KYUUBI #3500] Supply TPC data initialization SQL script for Kyuubi playground 2022-09-20 21:21:54 +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;