You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2025/09/29 07:42:33 UTC
[PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
luoyuxia opened a new pull request, #1770:
URL: https://github.com/apache/fluss/pull/1770
<!--
*Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on PR #1770:
URL: https://github.com/apache/fluss/pull/1770#issuecomment-3345780624
LGTM!
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387188928
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -307,29 +466,81 @@ When integrating with Iceberg, Fluss automatically converts between Fluss data t
## Maintenance and Optimization
-### Auto Compaction
+### 🔧 Auto Compaction
Review Comment:
The icon is duplicated between the `Basic Configuration` title and the `Reading with Other Engines` title.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387006215
##########
fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java:
##########
@@ -314,8 +313,8 @@ private Snapshot getCommittedLatestSnapshotOfLake(String commitUser) {
List<Snapshot> snapshots = (List<Snapshot>) icebergTable.snapshots();
// snapshots() returns snapshots in chronological order (oldest to newest), Reverse to find
// most recent snapshot committed by Fluss
- Collections.reverse(snapshots);
- for (Snapshot snapshot : snapshots) {
+ for (int i = snapshots.size() - 1; i >= 0; i--) {
Review Comment:
Reverse snapshots directly will throw
```
Tiering table 1 is failed, fail reason is java.lang.UnsupportedOperationException
at org.apache.iceberg.relocated.com.google.common.collect.ImmutableList.set(ImmutableList.java:542)
at java.base/java.util.Collections.swap(Collections.java:501)
at java.base/java.util.Collections.reverse(Collections.java:382)
at org.apache.fluss.lake.iceberg.tiering.IcebergLakeCommitter.getCommittedLatestSnapshotOfLake(IcebergLak
```
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387004030
##########
fluss-lake/fluss-lake-iceberg/pom.xml:
##########
@@ -291,13 +298,7 @@
<configuration>
<artifactSet>
<includes>
- <include>org.apache.iceberg:iceberg-api</include>
- <include>org.apache.iceberg:iceberg-core</include>
- <include>org.apache.iceberg:iceberg-data</include>
- <include>org.apache.iceberg:iceberg-common</include>
- <include>org.apache.iceberg:iceberg-parquet</include>
- <include>org.apache.iceberg:iceberg-orc</include>
- <include>org.apache.iceberg:iceberg-bundled-guava</include>
+ <include>*:*</include>
Review Comment:
we must include all, otherwise, we will miss classes.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387185685
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -249,9 +394,19 @@ CREATE TABLE daily_sales (
SORTED BY (__offset ASC);
```
+### 📊 System Columns
+
+All Iceberg tables created by Fluss include three system columns:
+
+| Column | Type | Description |
+|---------------|---------------|-----------------------------------------------|
+| `__bucket` | INT | Fluss bucket identifier for data distribution |
+| `__offset` | BIGINT | Fluss log offset for ordering and seeking |
+| `__timestamp` | TIMESTAMP_LTZ | Fluss log timestamp for temporal ordering |
+
## Read Tables
-### Reading with other Engines
+### 🔧 Reading with Other Engines
Review Comment:
The icon is duplicated with the one for the `Basic Configuration` title.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #1770:
URL: https://github.com/apache/fluss/pull/1770
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387002792
##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/source/enumerator/FlinkSourceEnumerator.java:
##########
@@ -580,9 +581,8 @@ private List<SourceSplitBase> generateHybridLakeFlussSplits() {
pendingHybridLakeFlussSplits = lakeSplitGenerator.generateHybridLakeFlussSplits();
return pendingHybridLakeFlussSplits;
} catch (Exception e) {
- LOG.error("Failed to get hybrid lake fluss splits, won't take splits in lake.", e);
+ throw new FlinkRuntimeException("Failed to generate hybrid lake fluss splits", e);
Review Comment:
Let's just throw exception to notify users generate lake splits fails which should be exceptions happens that should be resolved by users.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387042323
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -266,17 +421,21 @@ PROPERTIES (
);
```
-```sql title="Query Examples"
+#### Query Examples
+
+```sql title="Basic Query"
-- Basic query
SELECT COUNT(*) FROM iceberg_catalog.fluss.orders;
+```
+```sql title="Time Travel Query"
-- Time travel query
-SELECT * FROM iceberg_catalog.fluss.orders
-FOR SYSTEM_VERSION AS OF 123456789;
+SELECT * FROM iceberg_catalog.fluss.orders FOR SYSTEM_VERSION AS OF 123456789;
+```
--- Query with bucket filtering for efficiency
-SELECT * FROM iceberg_catalog.fluss.orders
-WHERE __bucket = 1 AND __offset >= 100;
+```sql title="Query with bucket filtering for efficiency"
+-- Time travel query
Review Comment:
The comment says 'Time travel query' but the query is actually demonstrating bucket filtering. The comment should be '-- Bucket filtering query' to match the query's purpose.
```suggestion
-- Bucket filtering query
```
##########
fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java:
##########
@@ -49,7 +49,6 @@
import java.io.IOException;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
Review Comment:
The removed import `java.util.Collections` is no longer needed since `Collections.reverse()` has been replaced with reverse iteration. This is good cleanup.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387138258
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -27,49 +27,185 @@ datalake.iceberg.type: hadoop
datalake.iceberg.warehouse: /tmp/iceberg
```
+#### 🔧 Configuration Processing
+
Fluss processes Iceberg configurations by stripping the `datalake.iceberg.` prefix and uses the stripped configurations (without the prefix `datalake.iceberg.`) to initialize the Iceberg catalog.
-This approach enables passing custom configurations for iceberg catalog initiation. Checkout the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on the available configurations of catalog.
-Fluss supports all Iceberg-compatible catalog types. For catalogs such as `hive`, `hadoop`, `rest`, `glue`, `nessie`, and `jdbc`, you can specify them using the configuration `datalake.iceberg.type` with the corresponding value (e.g., `hive`, `hadoop`, etc.).
-For other types of catalogs, you can use `datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>` to specify the catalog implementation.
-For example, configure with `datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog` to use Snowflake catalog.
+This approach enables passing custom configurations for Iceberg catalog initialization. Check out the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on available catalog configurations.
+
+#### 📋 Supported Catalog Types
+
+Fluss supports all Iceberg-compatible catalog types:
+
+**Built-in Catalog Types:**
+- `hive` - Hive Metastore catalog
+- `hadoop` - Hadoop catalog
+- `rest` - REST catalog
+- `glue` - AWS Glue catalog
+- `nessie` - Nessie catalog
+- `jdbc` - JDBC catalog
+
+**Custom Catalog Implementation:**
+For other catalog types, you can use:
+```yaml
+datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>
+```
+
+**Example - Snowflake Catalog:**
+```yaml
+datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog
+```
+
+#### 🔧 Prerequisites
+
+##### 1. Hadoop Dependencies Configuration
+
+Some catalogs (such as `hadoop`, `hive` catalog) require Hadoop-related classes. Please ensure Hadoop-related classes are in your classpath.
+
+**Option 1: Use Existing Hadoop Environment (Recommended)**
+```bash
+export HADOOP_CLASSPATH=`hadoop classpath`
+```
+Export Hadoop classpath before starting Fluss. This allows Fluss to automatically load Hadoop dependencies from the machine.
+
+**Option 2: Download Pre-bundled Hadoop JAR**
+- Download: [hadoop-apache-3.3.5-2.jar](https://repo1.maven.org/maven2/io/trino/hadoop/hadoop-apache/3.3.5-2/hadoop-apache-3.3.5-2.jar)
+- Place the JAR file into `FLUSS_HOME/plugins/iceberg/` directory
+
+**Option 3: Download Complete Hadoop Package**
+- Download: [hadoop-3.3.5.tar.gz](https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz)
+- Extract and configure HADOOP_CLASSPATH:
+```bash
+# Download and extract Hadoop
+wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz
+tar -xzf hadoop-3.3.5.tar.gz
+
+# Set HADOOP_HOME to the extracted directory
+export HADOOP_HOME=$(pwd)/hadoop-3.3.5
+
+# Set HADOOP_CLASSPATH using the downloaded Hadoop
+export HADOOP_CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath`
+```
+
+##### 2. Custom Catalog Implementations
+
+Fluss only bundles catalog implementations included in the `iceberg-core` module. For any other catalog implementations not bundled within the `iceberg-core` module (e.g., Hive Catalog), you must place the corresponding JAR file into `FLUSS_HOME/plugins/iceberg/`.
+
+##### 3. Version Compatibility
+
+The Iceberg version that Fluss bundles is based on `1.9.2`. Please ensure the JARs you add are compatible with `Iceberg-1.9.2`.
Review Comment:
May be 1.9.1?
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387089978
##########
fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java:
##########
@@ -314,8 +313,8 @@ private Snapshot getCommittedLatestSnapshotOfLake(String commitUser) {
List<Snapshot> snapshots = (List<Snapshot>) icebergTable.snapshots();
// snapshots() returns snapshots in chronological order (oldest to newest), Reverse to find
// most recent snapshot committed by Fluss
- Collections.reverse(snapshots);
- for (Snapshot snapshot : snapshots) {
+ for (int i = snapshots.size() - 1; i >= 0; i--) {
Review Comment:
Not very sure, but did happen.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387166211
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -27,49 +27,185 @@ datalake.iceberg.type: hadoop
datalake.iceberg.warehouse: /tmp/iceberg
```
+#### 🔧 Configuration Processing
+
Fluss processes Iceberg configurations by stripping the `datalake.iceberg.` prefix and uses the stripped configurations (without the prefix `datalake.iceberg.`) to initialize the Iceberg catalog.
-This approach enables passing custom configurations for iceberg catalog initiation. Checkout the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on the available configurations of catalog.
-Fluss supports all Iceberg-compatible catalog types. For catalogs such as `hive`, `hadoop`, `rest`, `glue`, `nessie`, and `jdbc`, you can specify them using the configuration `datalake.iceberg.type` with the corresponding value (e.g., `hive`, `hadoop`, etc.).
-For other types of catalogs, you can use `datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>` to specify the catalog implementation.
-For example, configure with `datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog` to use Snowflake catalog.
+This approach enables passing custom configurations for Iceberg catalog initialization. Check out the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on available catalog configurations.
+
+#### 📋 Supported Catalog Types
+
+Fluss supports all Iceberg-compatible catalog types:
+
+**Built-in Catalog Types:**
+- `hive` - Hive Metastore catalog
+- `hadoop` - Hadoop catalog
+- `rest` - REST catalog
+- `glue` - AWS Glue catalog
+- `nessie` - Nessie catalog
+- `jdbc` - JDBC catalog
+
+**Custom Catalog Implementation:**
+For other catalog types, you can use:
+```yaml
+datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>
+```
+
+**Example - Snowflake Catalog:**
+```yaml
+datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog
+```
+
+#### 🔧 Prerequisites
+
+##### 1. Hadoop Dependencies Configuration
+
+Some catalogs (such as `hadoop`, `hive` catalog) require Hadoop-related classes. Please ensure Hadoop-related classes are in your classpath.
+
+**Option 1: Use Existing Hadoop Environment (Recommended)**
+```bash
+export HADOOP_CLASSPATH=`hadoop classpath`
+```
+Export Hadoop classpath before starting Fluss. This allows Fluss to automatically load Hadoop dependencies from the machine.
+
+**Option 2: Download Pre-bundled Hadoop JAR**
+- Download: [hadoop-apache-3.3.5-2.jar](https://repo1.maven.org/maven2/io/trino/hadoop/hadoop-apache/3.3.5-2/hadoop-apache-3.3.5-2.jar)
+- Place the JAR file into `FLUSS_HOME/plugins/iceberg/` directory
+
+**Option 3: Download Complete Hadoop Package**
+- Download: [hadoop-3.3.5.tar.gz](https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz)
+- Extract and configure HADOOP_CLASSPATH:
+```bash
+# Download and extract Hadoop
+wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz
+tar -xzf hadoop-3.3.5.tar.gz
+
+# Set HADOOP_HOME to the extracted directory
+export HADOOP_HOME=$(pwd)/hadoop-3.3.5
+
+# Set HADOOP_CLASSPATH using the downloaded Hadoop
+export HADOOP_CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath`
+```
+
+##### 2. Custom Catalog Implementations
+
+Fluss only bundles catalog implementations included in the `iceberg-core` module. For any other catalog implementations not bundled within the `iceberg-core` module (e.g., Hive Catalog), you must place the corresponding JAR file into `FLUSS_HOME/plugins/iceberg/`.
+
+##### 3. Version Compatibility
+
+The Iceberg version that Fluss bundles is based on `1.9.2`. Please ensure the JARs you add are compatible with `Iceberg-1.9.2`.
+
+#### ⚠️ Important Notes
+
+- Ensure all JAR files are compatible with Iceberg 1.9.2
+- If using an existing Hadoop environment, it's recommended to use the `HADOOP_CLASSPATH` environment variable
+- Configuration changes take effect after restarting the Fluss service
+
+### 🚀 Start Tiering Service to Iceberg
+
+To tier Fluss's data to Iceberg, you must start the datalake tiering service. For guidance, you can refer to [Start The Datalake Tiering Service](maintenance/tiered-storage/lakehouse-storage.md#start-the-datalake-tiering-service). Although the example uses Paimon, the process is also applicable to Iceberg.
+
+#### 🔧 Prerequisites: Hadoop Dependencies
+
+**⚠️ Important**: Iceberg has a strong dependency on Hadoop. You must ensure Hadoop-related classes are available in the classpath before starting the tiering service.
+
+##### Option 1: Use Existing Hadoop Environment (Recommended)
Review Comment:
Although similar, I still want to put it in here to highlight it to avoid users jump to another section.
Also, it's used for Flink, not for Fluss. So I want to put in here to show the difference.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387056398
##########
fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java:
##########
@@ -314,8 +313,8 @@ private Snapshot getCommittedLatestSnapshotOfLake(String commitUser) {
List<Snapshot> snapshots = (List<Snapshot>) icebergTable.snapshots();
// snapshots() returns snapshots in chronological order (oldest to newest), Reverse to find
// most recent snapshot committed by Fluss
- Collections.reverse(snapshots);
- for (Snapshot snapshot : snapshots) {
+ for (int i = snapshots.size() - 1; i >= 0; i--) {
Review Comment:
Agree with the fix. Just curious - in what scenarios would icebergTable.snapshots() return an ImmutableList? In our unit tests, it's returning an ArrayList, which works with Collections.reverse().
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [hotfix] Fix commit bugs of iceberg and improve document [fluss]
Posted by "beryllw (via GitHub)" <gi...@apache.org>.
beryllw commented on code in PR #1770:
URL: https://github.com/apache/fluss/pull/1770#discussion_r2387157663
##########
website/docs/streaming-lakehouse/integrate-data-lakes/iceberg.md:
##########
@@ -27,49 +27,185 @@ datalake.iceberg.type: hadoop
datalake.iceberg.warehouse: /tmp/iceberg
```
+#### 🔧 Configuration Processing
+
Fluss processes Iceberg configurations by stripping the `datalake.iceberg.` prefix and uses the stripped configurations (without the prefix `datalake.iceberg.`) to initialize the Iceberg catalog.
-This approach enables passing custom configurations for iceberg catalog initiation. Checkout the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on the available configurations of catalog.
-Fluss supports all Iceberg-compatible catalog types. For catalogs such as `hive`, `hadoop`, `rest`, `glue`, `nessie`, and `jdbc`, you can specify them using the configuration `datalake.iceberg.type` with the corresponding value (e.g., `hive`, `hadoop`, etc.).
-For other types of catalogs, you can use `datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>` to specify the catalog implementation.
-For example, configure with `datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog` to use Snowflake catalog.
+This approach enables passing custom configurations for Iceberg catalog initialization. Check out the [Iceberg Catalog Properties](https://iceberg.apache.org/docs/1.9.1/configuration/#catalog-properties) for more details on available catalog configurations.
+
+#### 📋 Supported Catalog Types
+
+Fluss supports all Iceberg-compatible catalog types:
+
+**Built-in Catalog Types:**
+- `hive` - Hive Metastore catalog
+- `hadoop` - Hadoop catalog
+- `rest` - REST catalog
+- `glue` - AWS Glue catalog
+- `nessie` - Nessie catalog
+- `jdbc` - JDBC catalog
+
+**Custom Catalog Implementation:**
+For other catalog types, you can use:
+```yaml
+datalake.iceberg.catalog-impl: <your_iceberg_catalog_impl_class_name>
+```
+
+**Example - Snowflake Catalog:**
+```yaml
+datalake.iceberg.catalog-impl: org.apache.iceberg.snowflake.SnowflakeCatalog
+```
+
+#### 🔧 Prerequisites
+
+##### 1. Hadoop Dependencies Configuration
+
+Some catalogs (such as `hadoop`, `hive` catalog) require Hadoop-related classes. Please ensure Hadoop-related classes are in your classpath.
+
+**Option 1: Use Existing Hadoop Environment (Recommended)**
+```bash
+export HADOOP_CLASSPATH=`hadoop classpath`
+```
+Export Hadoop classpath before starting Fluss. This allows Fluss to automatically load Hadoop dependencies from the machine.
+
+**Option 2: Download Pre-bundled Hadoop JAR**
+- Download: [hadoop-apache-3.3.5-2.jar](https://repo1.maven.org/maven2/io/trino/hadoop/hadoop-apache/3.3.5-2/hadoop-apache-3.3.5-2.jar)
+- Place the JAR file into `FLUSS_HOME/plugins/iceberg/` directory
+
+**Option 3: Download Complete Hadoop Package**
+- Download: [hadoop-3.3.5.tar.gz](https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz)
+- Extract and configure HADOOP_CLASSPATH:
+```bash
+# Download and extract Hadoop
+wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz
+tar -xzf hadoop-3.3.5.tar.gz
+
+# Set HADOOP_HOME to the extracted directory
+export HADOOP_HOME=$(pwd)/hadoop-3.3.5
+
+# Set HADOOP_CLASSPATH using the downloaded Hadoop
+export HADOOP_CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath`
+```
+
+##### 2. Custom Catalog Implementations
+
+Fluss only bundles catalog implementations included in the `iceberg-core` module. For any other catalog implementations not bundled within the `iceberg-core` module (e.g., Hive Catalog), you must place the corresponding JAR file into `FLUSS_HOME/plugins/iceberg/`.
+
+##### 3. Version Compatibility
+
+The Iceberg version that Fluss bundles is based on `1.9.2`. Please ensure the JARs you add are compatible with `Iceberg-1.9.2`.
+
+#### ⚠️ Important Notes
+
+- Ensure all JAR files are compatible with Iceberg 1.9.2
+- If using an existing Hadoop environment, it's recommended to use the `HADOOP_CLASSPATH` environment variable
+- Configuration changes take effect after restarting the Fluss service
+
+### 🚀 Start Tiering Service to Iceberg
+
+To tier Fluss's data to Iceberg, you must start the datalake tiering service. For guidance, you can refer to [Start The Datalake Tiering Service](maintenance/tiered-storage/lakehouse-storage.md#start-the-datalake-tiering-service). Although the example uses Paimon, the process is also applicable to Iceberg.
+
+#### 🔧 Prerequisites: Hadoop Dependencies
+
+**⚠️ Important**: Iceberg has a strong dependency on Hadoop. You must ensure Hadoop-related classes are available in the classpath before starting the tiering service.
+
+##### Option 1: Use Existing Hadoop Environment (Recommended)
Review Comment:
Looks similar to the Iceberg catalog Hadoop dependencies configuration. Maybe we could reference this document?
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org