kevinjqliu commented on code in PR #15124: URL: https://github.com/apache/iceberg/pull/15124#discussion_r2812860524
########## docker/iceberg-flink-quickstart/Dockerfile: ########## @@ -0,0 +1,57 @@ +# +# 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. +# + +# Version arguments - can be overridden at build time +ARG FLINK_VERSION=2.0 + +FROM apache/flink:${FLINK_VERSION}-java21 + +SHELL ["/bin/bash", "-c"] + +# Redeclare ARG variables after FROM to make them available in subsequent layers +ARG ICEBERG_VERSION=1.10.1 +ARG ICEBERG_FLINK_RUNTIME_VERSION=2.0 +ARG ICEBERG_AWS_BUNDLE_VERSION=1.9.2 Review Comment: ```suggestion ARG ICEBERG_FLINK_RUNTIME_VERSION=2.0 ARG ICEBERG_VERSION=1.10.1 ARG ICEBERG_AWS_BUNDLE_VERSION=1.10.1 ``` i think we should align the versions here, reordered for consistency ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | Review Comment: ```suggestion | `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | | `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | | `ICEBERG_AWS_BUNDLE_VERSION` | `1.10.1` | Iceberg AWS bundle version | ``` ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | +| `HADOOP_VERSION` | `3.4.2` | Apache Hadoop version | + +## Building Locally + +To build the image locally with default versions: + +```bash +docker build -t apache/iceberg-flink-quickstart docker/iceberg-flink-quickstart/ +``` + +To build with custom versions: + +```bash +docker build \ + --build-arg FLINK_VERSION=2.0 \ + --build-arg ICEBERG_VERSION=1.10.1 \ + -t apache/iceberg-flink-quickstart \ + docker/iceberg-flink-quickstart/ +``` + +## Usage + +### Using docker-compose + +The easiest way to get started is using the quickstart docker-compose file: + +```bash +cd docker/iceberg-flink-quickstart +docker compose up -d +``` + +Then connect to Flink SQL client: + +```bash +docker exec -it jobmanager ./bin/sql-client.sh +``` + +### Running Directly Review Comment: nit: is this necessary? feels like additional complexity. we should just let users run the docker-compose file directly ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | +| `HADOOP_VERSION` | `3.4.2` | Apache Hadoop version | + +## Building Locally + +To build the image locally with default versions: + +```bash +docker build -t apache/iceberg-flink-quickstart docker/iceberg-flink-quickstart/ +``` + +To build with custom versions: + +```bash +docker build \ + --build-arg FLINK_VERSION=2.0 \ + --build-arg ICEBERG_VERSION=1.10.1 \ + -t apache/iceberg-flink-quickstart \ + docker/iceberg-flink-quickstart/ +``` + +## Usage + +### Using docker-compose + +The easiest way to get started is using the quickstart docker-compose file: + +```bash +cd docker/iceberg-flink-quickstart +docker compose up -d Review Comment: ```suggestion docker compose -f docker/iceberg-flink-quickstart/docker-compose.yml up -d ``` aligns with instructions in docker-compose.yml ########## docker/iceberg-flink-quickstart/docker-compose.yml: ########## @@ -0,0 +1,135 @@ +# +# 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. +# + +# Flink Quickstart with Apache Iceberg +# +# Usage: +# docker compose -f docker/iceberg-flink-quickstart/docker-compose.yml up -d +# +# Connect to SQL client: +# docker exec -it jobmanager ./bin/sql-client.sh +services: + # Flink JobManager + jobmanager: + build: . + hostname: jobmanager + container_name: jobmanager + depends_on: + - iceberg-rest + networks: + iceberg_net: + ports: + - "8081:8081" + command: jobmanager + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8081/overview"] + start_period: 30s + interval: 5s + timeout: 3s + retries: 5 + environment: + FLINK_PROPERTIES: | + jobmanager.rpc.address: jobmanager + taskmanager.numberOfTaskSlots: 2 + parallelism.default: 2 + AWS_REGION: us-east-1 + AWS_ACCESS_KEY_ID: admin + AWS_SECRET_ACCESS_KEY: password + S3_ENDPOINT: http://minio:9000 + + # Flink TaskManager + taskmanager: + build: . + hostname: taskmanager + depends_on: + - jobmanager + networks: + iceberg_net: + command: taskmanager + deploy: + replicas: 1 + environment: + FLINK_PROPERTIES: | + jobmanager.rpc.address: jobmanager + taskmanager.numberOfTaskSlots: 2 + parallelism.default: 2 + AWS_REGION: us-east-1 + AWS_ACCESS_KEY_ID: admin + AWS_SECRET_ACCESS_KEY: password + S3_ENDPOINT: http://minio:9000 + + # Iceberg REST Catalog + iceberg-rest: + image: apache/iceberg-rest-fixture + hostname: iceberg-rest + depends_on: + create-bucket: + condition: service_completed_successfully + networks: + iceberg_net: + ports: + - "8181:8181" + environment: Review Comment: ```suggestion environment: healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8181/v1/config"] interval: 5s timeout: 3s retries: 5 ``` ########## docker/iceberg-flink-quickstart/docker-compose.yml: ########## @@ -0,0 +1,135 @@ +# +# 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. +# + +# Flink Quickstart with Apache Iceberg +# +# Usage: +# docker compose -f docker/iceberg-flink-quickstart/docker-compose.yml up -d +# +# Connect to SQL client: +# docker exec -it jobmanager ./bin/sql-client.sh +services: + # Flink JobManager + jobmanager: + build: . + hostname: jobmanager + container_name: jobmanager + depends_on: + - iceberg-rest Review Comment: ```suggestion depends_on: iceberg-rest: condition: service_healthy ``` ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | +| `HADOOP_VERSION` | `3.4.2` | Apache Hadoop version | + +## Building Locally + +To build the image locally with default versions: + +```bash +docker build -t apache/iceberg-flink-quickstart docker/iceberg-flink-quickstart/ +``` + +To build with custom versions: + +```bash +docker build \ + --build-arg FLINK_VERSION=2.0 \ + --build-arg ICEBERG_VERSION=1.10.1 \ + -t apache/iceberg-flink-quickstart \ + docker/iceberg-flink-quickstart/ +``` + +## Usage + +### Using docker-compose + +The easiest way to get started is using the quickstart docker-compose file: Review Comment: ```suggestion The easiest way to get started is using the quickstart docker-compose file from the repository root: ``` ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | +| `HADOOP_VERSION` | `3.4.2` | Apache Hadoop version | + +## Building Locally + +To build the image locally with default versions: + +```bash +docker build -t apache/iceberg-flink-quickstart docker/iceberg-flink-quickstart/ +``` + +To build with custom versions: + +```bash +docker build \ + --build-arg FLINK_VERSION=2.0 \ + --build-arg ICEBERG_VERSION=1.10.1 \ + -t apache/iceberg-flink-quickstart \ + docker/iceberg-flink-quickstart/ +``` + +## Usage + +### Using docker-compose Review Comment: ```suggestion ### Using docker compose ``` ########## docker/iceberg-flink-quickstart/README.md: ########## @@ -0,0 +1,94 @@ +<!-- + - 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. + --> + +# Iceberg Flink Quickstart Docker Image + +A pre-configured Apache Flink image with Apache Iceberg dependencies for quickly getting started with Iceberg on Flink. + +## Overview + +This Docker image extends the official Apache Flink image to include: + +- Iceberg Flink runtime +- Iceberg AWS bundle for S3/Glue support +- Minimal Hadoop dependencies necessary for Flink + +## Build Arguments + +The following build arguments can be customized when building the image: + +| Argument | Default | Description | +|----------|---------|-------------| +| `FLINK_VERSION` | `2.0` | Apache Flink version | +| `ICEBERG_VERSION` | `1.10.1` | Apache Iceberg version | +| `ICEBERG_FLINK_RUNTIME_VERSION` | `2.0` | Iceberg Flink runtime version | +| `ICEBERG_AWS_BUNDLE_VERSION` | `1.9.2` | Iceberg AWS bundle version | +| `HADOOP_VERSION` | `3.4.2` | Apache Hadoop version | + +## Building Locally + +To build the image locally with default versions: + +```bash +docker build -t apache/iceberg-flink-quickstart docker/iceberg-flink-quickstart/ +``` + +To build with custom versions: + +```bash +docker build \ + --build-arg FLINK_VERSION=2.0 \ + --build-arg ICEBERG_VERSION=1.10.1 \ + -t apache/iceberg-flink-quickstart \ + docker/iceberg-flink-quickstart/ +``` + +## Usage + +### Using docker-compose + +The easiest way to get started is using the quickstart docker-compose file: + +```bash +cd docker/iceberg-flink-quickstart +docker compose up -d +``` + +Then connect to Flink SQL client: + +```bash +docker exec -it jobmanager ./bin/sql-client.sh +``` + Review Comment: ```suggestion To stop the stack: ```bash docker compose -f docker/iceberg-flink-quickstart/docker-compose.yml down ``` ``` ########## docker/iceberg-flink-quickstart/docker-compose.yml: ########## @@ -0,0 +1,135 @@ +# +# 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. +# + +# Flink Quickstart with Apache Iceberg +# +# Usage: +# docker compose -f docker/iceberg-flink-quickstart/docker-compose.yml up -d +# +# Connect to SQL client: +# docker exec -it jobmanager ./bin/sql-client.sh +services: + # Flink JobManager + jobmanager: + build: . + hostname: jobmanager + container_name: jobmanager + depends_on: + - iceberg-rest + networks: + iceberg_net: + ports: + - "8081:8081" + command: jobmanager + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8081/overview"] + start_period: 30s + interval: 5s + timeout: 3s + retries: 5 + environment: + FLINK_PROPERTIES: | + jobmanager.rpc.address: jobmanager + taskmanager.numberOfTaskSlots: 2 + parallelism.default: 2 + AWS_REGION: us-east-1 + AWS_ACCESS_KEY_ID: admin + AWS_SECRET_ACCESS_KEY: password + S3_ENDPOINT: http://minio:9000 + + # Flink TaskManager + taskmanager: + build: . + hostname: taskmanager + depends_on: + - jobmanager Review Comment: ```suggestion depends_on: jobmanager: condition: service_healthy ``` nit: health check -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
