Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .github/workflows/ci-flink.yaml

This file was deleted.

15 changes: 12 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
name: Tests on JDK 8
name: CI
on:
push:
branches:
Expand All @@ -31,13 +31,22 @@ concurrency:
jobs:
build:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
module: [ core, flink ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
mvn -T 1C -B clean install -DskipTests
- name: Test
timeout-minutes: 60
run: |
mvn -B verify -Ptest-coverage -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties
TEST_MODULES=$(./.github/workflows/stage.sh ${{ matrix.module }})
echo "Start testing modules: $TEST_MODULES"
mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties
env:
MAVEN_OPTS: -Xmx4096m
ARTIFACTS_OSS_ENDPOINT: ${{ secrets.ARTIFACTS_OSS_ENDPOINT }}
Expand All @@ -51,5 +60,5 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: logs-test-${{ github.run_number}}#${{ github.run_attempt }}
name: logs-test-${{ matrix.module }}-${{ github.run_number}}#${{ github.run_attempt }}
path: ${{ runner.temp }}/fluss-logs/*
49 changes: 49 additions & 0 deletions .github/workflows/stage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
################################################################################
# Copyright (c) 2025 Alibaba Group Holding Ltd.
#
# Licensed 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.
################################################################################

STAGE_CORE="core"
STAGE_FLINK="flink"

MODULES_FLINK="\
fluss-flink,\
fluss-flink/fluss-flink-common,\
fluss-flink/fluss-flink-1.20,\
fluss-flink/fluss-flink-1.19,\
fluss-flink/fluss-flink-1.18,\
fluss-lakehouse,\
fluss-lakehouse/fluss-lakehouse-cli,\
fluss-lakehouse/fluss-lakehouse-paimon,\
fluss-lake,\
"

function get_test_modules_for_stage() {
local stage=$1

local modules_flink=$MODULES_FLINK
local modules_core=\!${MODULES_FLINK//,/,\!}

case ${stage} in
(${STAGE_CORE})
echo "-pl $modules_core"
;;
(${STAGE_FLINK})
echo "-pl fluss-test-coverage,$modules_flink"
;;
esac
}

get_test_modules_for_stage $1
24 changes: 24 additions & 0 deletions fluss-flink/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
Copyright (c) 2025 Alibaba Group Holding Ltd.

Licensed 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.
-->

# Multi-Version Support for Flink Engine

Fluss supports multiple versions of Apache Flink by providing dedicated modules for each version.
The `fluss-flink-common` module always targets the latest version of Flink, while the `fluss-flink-${flink.version}` modules depend on both `fluss-flink-common` and the corresponding Flink version.

Occasionally, Flink's interfaces may change across versions. For example, the class `org.apache.flink.api.connector.sink2.WriterInitContext` was
introduced in Flink v1.19, while older APIs were deprecated or removed. In such cases, we address compatibility issues within the specific `fluss-flink-${flink.version}` module.
This may involve introducing placeholder classes, such as `org.apache.flink.api.connector.sink2.WriterInitContext`, to ensure successful compilation.
174 changes: 174 additions & 0 deletions fluss-flink/fluss-flink-1.18/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 Alibaba Group Holding Ltd.
~
~ Licensed 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-flink</artifactId>
<version>0.7-SNAPSHOT</version>
</parent>

<artifactId>fluss-flink-1.18</artifactId>

<name>Fluss : Engine Flink : 1.18</name>

<properties>
<flink.major.version>1.18</flink.major.version>
<flink.minor.version>1.18.1</flink.minor.version>
</properties>

<dependencies>
<!-- Fluss dependency -->
<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-client</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-flink-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Flink dependency -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${flink.minor.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-common</artifactId>
<version>${flink.minor.version}</version>
<scope>provided</scope>
</dependency>

<!-- test dependency -->
<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-flink-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-test-utils</artifactId>
<version>${flink.minor.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${flink.minor.version}</version>
<scope>test</scope>
</dependency>


<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>

<!-- for curator TestingServer -->
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-common</artifactId>
<version>${flink.minor.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-test-utils</artifactId>
<version>${flink.minor.version}</version>
<scope>test</scope>
</dependency>


<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-test-utils</artifactId>
</dependency>

<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-fluss</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes combine.children="append">
<include>com.alibaba.fluss:fluss-client</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.apache.flink.api.common;
package org.apache.flink.api.connector.sink2;

/** Placeholder class to resolve compatibility issues. */
public interface JobInfo {}
public interface WriterInitContext extends Sink.InitContext {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2025 Alibaba Group Holding Ltd.
*
* Licensed 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.
*/

package com.alibaba.fluss.flink.catalog;

/** IT case for catalog in Flink 1.18. */
public class Flink118CatalogITCase extends FlinkCatalogITCase {}
Loading