Skip to content

Commit 2e2badc

Browse files
authored
[hotfix] Fix commit bugs of iceberg and improve document (#1770)
1 parent e543d1c commit 2e2badc

File tree

5 files changed

+315
-66
lines changed

5 files changed

+315
-66
lines changed

fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/source/enumerator/FlinkSourceEnumerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ private List<SourceSplitBase> getLogSplit(
609609
return splits;
610610
}
611611

612+
/** Return the hybrid lake and fluss splits. Return null if no lake snapshot. */
612613
@Nullable
613614
private List<SourceSplitBase> generateHybridLakeFlussSplits() {
614615
// still have pending lake fluss splits,
@@ -630,9 +631,8 @@ private List<SourceSplitBase> generateHybridLakeFlussSplits() {
630631
pendingHybridLakeFlussSplits = lakeSplitGenerator.generateHybridLakeFlussSplits();
631632
return pendingHybridLakeFlussSplits;
632633
} catch (Exception e) {
633-
LOG.error("Failed to get hybrid lake fluss splits, won't take splits in lake.", e);
634+
throw new FlinkRuntimeException("Failed to generate hybrid lake fluss splits", e);
634635
}
635-
return null;
636636
}
637637

638638
private boolean ignoreTableBucket(TableBucket tableBucket) {

fluss-lake/fluss-lake-iceberg/pom.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@
5151
<groupId>org.apache.iceberg</groupId>
5252
<artifactId>iceberg-data</artifactId>
5353
<version>${iceberg.version}</version>
54+
<exclusions>
55+
<!-- exclude dependency because of its GPLv2 license, see https://github.com/apache/flink/pull/15599#issuecomment-850241316 -->
56+
<exclusion>
57+
<groupId>javax.annotation</groupId>
58+
<artifactId>javax.annotation-api</artifactId>
59+
</exclusion>
60+
</exclusions>
5461
</dependency>
5562
<dependency>
5663
<groupId>org.apache.iceberg</groupId>
@@ -297,13 +304,7 @@
297304
<configuration>
298305
<artifactSet>
299306
<includes>
300-
<include>org.apache.iceberg:iceberg-api</include>
301-
<include>org.apache.iceberg:iceberg-core</include>
302-
<include>org.apache.iceberg:iceberg-data</include>
303-
<include>org.apache.iceberg:iceberg-common</include>
304-
<include>org.apache.iceberg:iceberg-parquet</include>
305-
<include>org.apache.iceberg:iceberg-orc</include>
306-
<include>org.apache.iceberg:iceberg-bundled-guava</include>
307+
<include>*:*</include>
307308
</includes>
308309
</artifactSet>
309310
<filters>

fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949

5050
import java.io.IOException;
5151
import java.util.Arrays;
52-
import java.util.Collections;
5352
import java.util.List;
5453
import java.util.Map;
5554
import java.util.stream.Collectors;
@@ -314,8 +313,8 @@ private Snapshot getCommittedLatestSnapshotOfLake(String commitUser) {
314313
List<Snapshot> snapshots = (List<Snapshot>) icebergTable.snapshots();
315314
// snapshots() returns snapshots in chronological order (oldest to newest), Reverse to find
316315
// most recent snapshot committed by Fluss
317-
Collections.reverse(snapshots);
318-
for (Snapshot snapshot : snapshots) {
316+
for (int i = snapshots.size() - 1; i >= 0; i--) {
317+
Snapshot snapshot = snapshots.get(i);
319318
Map<String, String> summary = snapshot.summary();
320319
if (summary != null && commitUser.equals(summary.get(COMMITTER_USER))) {
321320
return snapshot;

fluss-lake/fluss-lake-iceberg/src/main/resources/META-INF/NOTICE

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,42 @@ This project bundles the following dependencies under the Apache Software Licens
1212
- org.apache.iceberg:iceberg-common:1.9.1
1313
- org.apache.iceberg:iceberg-data:1.9.1
1414
- org.apache.iceberg:iceberg-orc:1.9.1
15-
- org.apache.iceberg:iceberg-parquet:1.9.1
15+
- org.apache.iceberg:iceberg-parquet:1.9.1
16+
- org.apache.avro:avro:1.12.0
17+
- org.apache.parquet:parquet-avro:1.15.2
18+
- org.apache.parquet:parquet-column:1.15.2
19+
- org.apache.parquet:parquet-encoding:1.15.2
20+
- org.apache.parquet:parquet-hadoop:1.15.2
21+
- org.apache.parquet:parquet-format-structures:1.15.2
22+
- org.apache.parquet:parquet-jackson:1.15.2
23+
- org.apache.parquet:parquet-common:1.15.2
24+
- org.apache.orc:orc-core:nohive:1.9.5
25+
- org.apache.orc:orc-shims:1.9.5
26+
- org.apache.commons:commons-lang3:3.18.0
27+
- org.apache.commons:commons-compress:1.21
28+
- org.apache.httpcomponents.client5:httpclient5:5.4.3
29+
- org.apache.httpcomponents.core5:httpcore5:5.3.4
30+
- org.apache.httpcomponents.core5:httpcore5-h2:5.3.4
31+
- com.fasterxml.jackson.core:jackson-core:2.15.3
32+
- com.fasterxml.jackson.core:jackson-databind:2.15.3
33+
- com.fasterxml.jackson.core:jackson-annotations:2.15.3
34+
- com.github.ben-manes.caffeine:caffeine:2.9.3
35+
- org.roaringbitmap:RoaringBitmap:1.3.0
36+
- io.airlift:aircompressor:0.27
37+
- org.xerial.snappy:snappy-java:1.1.10.4
38+
- com.google.code.findbugs:jsr305:1.3.9
39+
- org.jetbrains:annotations:17.0.0
40+
- commons-pool:commons-pool:1.6
41+
- com.google.errorprone:error_prone_annotations:2.10.0
42+
43+
This project bundles the following dependencies under the MIT (https://opensource.org/licenses/MIT)
44+
See bundled license files for details.
45+
46+
- org.slf4j:slf4j-api:1.7.36
47+
- org.checkerframework:checker-qual:3.19.0 MIT
48+
49+
This project bundles the following dependencies under BSD License (https://opensource.org/licenses/bsd-license.php).
50+
See bundled license files for details.
51+
52+
- com.github.luben:zstd-jni:1.5.7-1
53+
- org.threeten:threeten-extra:1.7.1

0 commit comments

Comments
 (0)