fresh-borzoni commented on code in PR #3851: URL: https://github.com/apache/fluss/pull/3851#discussion_r3824381846
########## devkit/compose/tiering.yml: ########## @@ -0,0 +1,114 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +x-flink-common: &flink-common + image: flink:1.20.0-scala_2.12-java17 Review Comment: We compile `fluss-flink-1.20` against `1.20.3`, and `hudi/server.urls` pulls `flink-core` `1.20.1`. Three patch versions with nothing tying them together. Can we pin to the pom property? ########## devkit/tests/paimon-create-table.sql: ########## @@ -0,0 +1,33 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +CREATE CATALOG fluss_catalog WITH ( + 'type' = 'fluss', + 'bootstrap.servers' = 'coordinator-server:19123', + 'paimon.s3.access-key' = 'rustfsadmin', + 'paimon.s3.secret-key' = 'rustfsadmin' +); + +USE CATALOG fluss_catalog; + +CREATE TABLE ${DEVKIT_TABLE} ( Review Comment: All four fixtures are append-only. Shall we add a PK table? ########## devkit/profiles/hudi/server.yaml: ########## @@ -0,0 +1,41 @@ +################################################################################ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + +remote.data.dir: s3://fluss/remote-data +s3.endpoint: http://rustfs:9000 +s3.access-key: rustfsadmin +s3.secret-key: rustfsadmin +s3.region: us-east-1 +s3.path-style-access: true +s3.assumed.role.arn: arn:aws:iam::000000000000:role/rustfsadmin +s3.assumed.role.sts.endpoint: http://rustfs:9000 + +datalake.enabled: true +datalake.format: hudi +datalake.hudi.mode: dfs +datalake.hudi.catalog.path: s3a://fluss/hudi +datalake.hudi.hadoop.fs.s3a.endpoint: http://rustfs:9000 +datalake.hudi.hadoop.fs.s3a.access.key: rustfsadmin +datalake.hudi.hadoop.fs.s3a.secret.key: rustfsadmin +datalake.hudi.hadoop.fs.s3a.path.style.access: true +datalake.hudi.hadoop.fs.s3a.connection.ssl.enabled: false +datalake.hudi.hadoop.fs.s3a.impl.disable.cache: true +datalake.hudi.hadoop.fs.s3a.aws.credentials.provider: org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider +datalake.hudi.hoodie.write.lock.provider: org.apache.hudi.client.transaction.lock.InProcessLockProvider + +fluss.tiering.poll.table.interval: 1s Review Comment: Only hudi and lance set this, iceberg and paimon get the 30s default. Intentional? ########## devkit/docker-compose.yml: ########## @@ -0,0 +1,181 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: fluss-devkit + +x-fluss-common: &fluss-common + image: ${FLUSS_DEVKIT_IMAGE:-eclipse-temurin:17-jre-noble} + init: true + restart: unless-stopped + stop_grace_period: 2m + volumes: + - ../build-target:/opt/fluss:ro + - ${FLUSS_DEVKIT_CONFIG:-./profiles/core/server.yaml}:/opt/fluss/conf/server.yaml:ro + - shared-data:/tmp/fluss + environment: + FLUSS_LOG_DIR: /tmp/fluss-logs + logging: + driver: json-file + options: + max-size: 10m + max-file: "3" + +x-tablet-common: &tablet-common + <<: *fluss-common + entrypoint: ["/opt/fluss/bin/tablet-server.sh", "start-foreground"] + depends_on: + coordinator-server: + condition: service_healthy + environment: + FLUSS_LOG_DIR: /tmp/fluss-logs + READINESS_TCP_PORT: "9123" + READINESS_HEALTH_CHECK_TIMEOUT_SECONDS: "180" + healthcheck: + test: ["CMD-SHELL", "bash /opt/fluss/bin/readiness-check.sh"] + interval: 5s + timeout: 15s + retries: 36 + start_period: 10s + +services: + # Flink runs as the flink user while Fluss creates this shared volume as root. + shared-data-init: + image: ${FLUSS_DEVKIT_IMAGE:-eclipse-temurin:17-jre-noble} + restart: "no" + volumes: + - shared-data:/tmp/fluss + entrypoint: ["/bin/bash", "-c"] + command: ["chmod 0777 /tmp/fluss"] + + zookeeper: + image: zookeeper:3.9.2 + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "zkServer.sh status"] + interval: 5s + timeout: 5s + retries: 20 + start_period: 5s + volumes: + - zookeeper-data:/data + - zookeeper-log:/datalog + + coordinator-server: + <<: *fluss-common + entrypoint: ["/opt/fluss/bin/coordinator-server.sh", "start-foreground"] + depends_on: + shared-data-init: + condition: service_completed_successfully + zookeeper: + condition: service_healthy + command: + - -Dzookeeper.address=zookeeper:2181 + - -Dbind.listeners=INTERNAL://coordinator-server:0,CLIENT://coordinator-server:9123,DEVKIT://coordinator-server:19123 + - -Dadvertised.listeners=CLIENT://localhost:${COORDINATOR_PORT:-9123} + - -Dinternal.listener.name=INTERNAL + - -Ddefault.replication.factor=${FLUSS_REPLICATION_FACTOR:-1} + - -Dmetrics.reporters=prometheus + - -Dmetrics.reporter.prometheus.port=9249 + environment: + FLUSS_LOG_DIR: /tmp/fluss-logs + FLUSS_ENV_JAVA_OPTS: -Xms512m -Xmx512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 + ports: + - "${COORDINATOR_PORT:-9123}:9123" + - "${COORDINATOR_DEBUG_PORT:-15005}:5005" + - "${COORDINATOR_METRICS_PORT:-9249}:9249" + healthcheck: + test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/coordinator-server/9123'"] + interval: 5s + timeout: 5s + retries: 24 + start_period: 10s + + tablet-server-0: + <<: *tablet-common + profiles: [single, cluster] + command: + - -Dzookeeper.address=zookeeper:2181 + - -Dbind.listeners=INTERNAL://tablet-server-0:0,CLIENT://tablet-server-0:9123,DEVKIT://tablet-server-0:19123 + - -Dadvertised.listeners=CLIENT://localhost:${TABLET_SERVER_0_PORT:-9124} + - -Dinternal.listener.name=INTERNAL + - -Dtablet-server.id=0 + - -Dkv.snapshot.interval=0s Review Comment: 0s disables periodic KV snapshots as PeriodicSnapshotManager.start() only schedules when the interval is > 0. PK tables will never snapshot and a restart replays the full log. Shall we use smth like 10s? ########## devkit/docker-compose.yml: ########## @@ -0,0 +1,181 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: fluss-devkit + +x-fluss-common: &fluss-common + image: ${FLUSS_DEVKIT_IMAGE:-eclipse-temurin:17-jre-noble} + init: true + restart: unless-stopped + stop_grace_period: 2m + volumes: + - ../build-target:/opt/fluss:ro + - ${FLUSS_DEVKIT_CONFIG:-./profiles/core/server.yaml}:/opt/fluss/conf/server.yaml:ro + - shared-data:/tmp/fluss + environment: + FLUSS_LOG_DIR: /tmp/fluss-logs Review Comment: Does this block ever apply? Every service declares its own `environment:`, which replaces it entirely. ########## devkit/profiles/hudi/server.urls: ########## @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +https://repo.maven.apache.org/maven2/io/trino/hadoop/hadoop-apache/3.3.5-2/hadoop-apache-3.3.5-2.jar +https://repo.maven.apache.org/maven2/org/apache/flink/flink-core/1.20.1/flink-core-1.20.1.jar Review Comment: Are these here because `plugins/hudi/` doesn't work on its own? Loading it with only the jar the assembly ships throws: NoClassDefFoundError: org/apache/flink/table/catalog/exceptions/DatabaseNotExistException at org.apache.fluss.lake.hudi.HudiLakeStorage.createLakeCatalog(HudiLakeStorage.java:46) `plugins.xml` only ships extra jars for paimon, so hudi gets nothing. Hudi isn't in a release yet, so I assume this is unfinished rather than a regression. @fhan688 can you help here to reason here, pls? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
