-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
2,723 additions
and
2,013 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DROP MATERIALIZED VIEW mv1; | ||
DROP TABLE t1; |
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
ci/scripts/sql/backfill/replication_with_column_pruning/create_base_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SET STREAMING_ENABLE_ARRANGEMENT_BACKFILL=true; | ||
create table t1 (x int, y int, z int); |
1 change: 1 addition & 0 deletions
1
ci/scripts/sql/backfill/replication_with_column_pruning/create_mv.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
create materialized view mv1 as select y, x from t1; |
2 changes: 2 additions & 0 deletions
2
ci/scripts/sql/backfill/replication_with_column_pruning/drop.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DROP MATERIALIZED VIEW mv1; | ||
DROP TABLE t1; |
2 changes: 2 additions & 0 deletions
2
ci/scripts/sql/backfill/replication_with_column_pruning/insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
insert into t1 select generate_series + 1, generate_series + 2, generate_series + 3 from generate_series(1, 100000); | ||
flush; |
1 change: 1 addition & 0 deletions
1
ci/scripts/sql/backfill/replication_with_column_pruning/select.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SELECT * FROM mv1 ORDER BY x LIMIT 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
version: "3" | ||
x-image: &image | ||
image: ${RW_IMAGE:-risingwavelabs/risingwave:nightly-20231211} | ||
services: | ||
risingwave-standalone: | ||
<<: *image | ||
command: "standalone --meta-opts=\" \ | ||
--listen-addr 0.0.0.0:5690 \ | ||
--advertise-addr 0.0.0.0:5690 \ | ||
--dashboard-host 0.0.0.0:5691 \ | ||
--prometheus-host 0.0.0.0:1250 \ | ||
--connector-rpc-endpoint 0.0.0.0:50051 \ | ||
--backend etcd \ | ||
--etcd-endpoints etcd-0:2388 \ | ||
--state-store hummock+fs://<local-path> \ | ||
--data-directory hummock_001 \ | ||
--config-path /risingwave.toml\" \ | ||
--compute-opts=\" \ | ||
--config-path /risingwave.toml \ | ||
--listen-addr 0.0.0.0:5688 \ | ||
--prometheus-listener-addr 0.0.0.0:1222 \ | ||
--advertise-addr 0.0.0.0:5688 \ | ||
--async-stack-trace verbose \ | ||
--connector-rpc-endpoint 0.0.0.0:50051 \ | ||
# --parallelism 4 \ | ||
--role both \ | ||
--meta-address http://0.0.0.0:5690\" \ | ||
--frontend-opts=\" \ | ||
--config-path /risingwave.toml \ | ||
--listen-addr 0.0.0.0:4566 \ | ||
--advertise-addr 0.0.0.0:4566 \ | ||
--prometheus-listener-addr 0.0.0.0:2222 \ | ||
--health-check-listener-addr 0.0.0.0:6786 \ | ||
--meta-addr http://0.0.0.0:5690\" \ | ||
--compactor-opts=\" \ | ||
--listen-addr 0.0.0.0:6660 \ | ||
--prometheus-listener-addr 0.0.0.0:1260 \ | ||
--advertise-addr 0.0.0.0:6660 \ | ||
--meta-address http://0.0.0.0:5690\"" | ||
expose: | ||
- "6660" | ||
- "1260" | ||
- "4566" | ||
- "5688" | ||
- "1222" | ||
- "5690" | ||
- "1250" | ||
- "5691" | ||
- "2222" | ||
ports: | ||
- "4566:4566" | ||
- "5690:5690" | ||
- "5691:5691" | ||
- "1222:1222" | ||
- "1250:1250" | ||
- "1260:1260" | ||
- "2222:2222" | ||
depends_on: | ||
- etcd-0 | ||
volumes: | ||
- "./risingwave.toml:/risingwave.toml" | ||
environment: | ||
RUST_BACKTRACE: "1" | ||
# If ENABLE_TELEMETRY is not set, telemetry will start by default | ||
ENABLE_TELEMETRY: ${ENABLE_TELEMETRY:-true} | ||
container_name: risingwave-standalone | ||
healthcheck: | ||
test: | ||
- CMD-SHELL | ||
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/6660; exit $$?;' | ||
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5688; exit $$?;' | ||
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/4566; exit $$?;' | ||
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5690; exit $$?;' | ||
interval: 1s | ||
timeout: 5s | ||
restart: always | ||
deploy: | ||
resources: | ||
limits: | ||
memory: <config-the-allocated-memory> | ||
reservations: | ||
memory: <config-the-allocated-memory> | ||
etcd-0: | ||
extends: | ||
file: docker-compose.yml | ||
service: etcd-0 | ||
grafana-0: | ||
extends: | ||
file: docker-compose.yml | ||
service: grafana-0 | ||
prometheus-0: | ||
extends: | ||
file: docker-compose.yml | ||
service: prometheus-0 | ||
volumes: | ||
etcd-0: | ||
external: false | ||
grafana-0: | ||
external: false | ||
prometheus-0: | ||
external: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# set gcloud | ||
docker compose exec gcloud-cli gcloud auth login --cred-file=/gcp-rwctest.json | ||
|
||
docker compose exec gcloud-cli gcloud config set project rwctest | ||
|
||
bq_prepare_file='bq_prepare.sql' | ||
bq_prepare_content=$(cat $bq_prepare_file) | ||
|
||
docker compose exec gcloud-cli bq query --use_legacy_sql=false "$bq_prepare_content" | ||
|
||
sleep 10 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import json | ||
import subprocess | ||
import sys | ||
|
||
relations = ['rwctest.bqtest.bq_sink'] | ||
|
||
failed_cases = [] | ||
for rel in relations: | ||
sql = f"SELECT COUNT(*) AS count FROM `{rel}`" | ||
print(f"run sql: {sql} on Bigquery") | ||
rows = subprocess.check_output( | ||
["docker", "compose", "exec", "gcloud-cli", "bq", "query", "--use_legacy_sql=false", "--format=json", sql], | ||
) | ||
rows = int(json.loads(rows.decode("utf-8").strip())[0]['count']) | ||
print(f"{rows} rows in {rel}") | ||
if rows < 1: | ||
failed_cases.append(rel) | ||
|
||
drop_sql = f"DROP TABLE IF EXISTS `{rel}`" | ||
subprocess.run(["docker", "compose", "exec", "gcloud-cli", "bq", "query", "--use_legacy_sql=false", drop_sql], | ||
check=True) | ||
|
||
if len(failed_cases) != 0: | ||
print(f"Data check failed for case {failed_cases}") | ||
sys.exit(1) |
Oops, something went wrong.