This is an automated email from the ASF dual-hosted git repository.

xtsong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git

commit 507f1e13bf6e6df8a2fc0673e0ff31d78132f55c
Author: youjin <[email protected]>
AuthorDate: Thu Dec 25 18:01:18 2025 +0800

    [build] Support Multi-Version Flink in Java
---
 {runtime => dist/flink-1.20}/pom.xml               | 130 ++++++++++++++-------
 .../agents/runtime/operator/OperatorUtils.java     |  28 +++++
 .../agents/runtime/operator/OperatorUtilsTest.java |  87 ++++++++++++++
 dist/flink-2.0/pom.xml                             |  91 +++++++++++++++
 dist/flink-2.1/pom.xml                             |  91 +++++++++++++++
 dist/{ => flink-2.2}/pom.xml                       |  51 +++-----
 dist/pom.xml                                       |  27 ++++-
 pom.xml                                            |  15 +--
 runtime/pom.xml                                    |   9 ++
 .../runtime/operator/ActionExecutionOperator.java  |   5 +-
 .../agents/runtime/operator/OperatorUtils.java     |  26 +++++
 11 files changed, 466 insertions(+), 94 deletions(-)

diff --git a/runtime/pom.xml b/dist/flink-1.20/pom.xml
similarity index 50%
copy from runtime/pom.xml
copy to dist/flink-1.20/pom.xml
index 4a210c5..bf465a5 100644
--- a/runtime/pom.xml
+++ b/dist/flink-1.20/pom.xml
@@ -21,53 +21,31 @@ under the License.
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.flink</groupId>
-        <artifactId>flink-agents</artifactId>
+        <artifactId>flink-agents-dist</artifactId>
         <version>0.2-SNAPSHOT</version>
     </parent>
 
-    <artifactId>flink-agents-runtime</artifactId>
-    <name>Flink Agents : Runtime</name>
+    <artifactId>flink-agents-dist-flink-1.20</artifactId>
+    <name>Flink Agents : Dist : Flink 1.20</name>
 
-    <dependencies>
-        <!-- flink agents -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-agents-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-agents-plan</artifactId>
-            <version>${project.version}</version>
-        </dependency>
+    <properties>
+        <flink.version>${flink.1.20.version}</flink.version>
+    </properties>
 
-        <!-- flink -->
+    <dependencies>
+        <!-- Flink dependencies -->
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-streaming-java</artifactId>
             <version>${flink.version}</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-streaming-java</artifactId>
-            <version>${flink.version}</version>
-            <scope>test</scope>
-            <type>test-jar</type>
-        </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-runtime</artifactId>
             <version>${flink.version}</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-runtime</artifactId>
-            <version>${flink.version}</version>
-            <scope>test</scope>
-            <type>test-jar</type>
-        </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-clients</artifactId>
@@ -98,40 +76,104 @@ under the License.
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-test-utils</artifactId>
-            <version>${flink.version}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-python</artifactId>
             <version>${flink.version}</version>
             <scope>provided</scope>
         </dependency>
-        <!-- kafka client -->
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-clients</artifactId>
-            <version>${kafka.version}</version>
-        </dependency>
-        <!-- LOG -->
+
+        <!-- LOG dependencies for test -->
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>${slf4j.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>${log4j2.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
             <version>${log4j2.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-slf4j-impl</artifactId>
             <version>${log4j2.version}</version>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+    <build>
+        <plugins>
+            <!-- Copy the shared LICENSE file from the parent directory -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-shared-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    
<directory>${project.parent.basedir}/src/main/resources</directory>
+                                    <includes>
+                                        <include>META-INF/**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Override parent's shade plugin -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>shade-flink-agents</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeTestJar>false</shadeTestJar>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/*.SF</exclude>
+                                        <exclude>META-INF/*.DSA</exclude>
+                                        <exclude>META-INF/*.RSA</exclude>
+                                    </excludes>
+                                </filter>
+                                <!-- Exclude the conflict classes of the 
runtime module, using version flink-1.20. -->
+                                <filter>
+                                    
<artifact>org.apache.flink:flink-agents-runtime</artifact>
+                                    <excludes>
+                                        
<exclude>org/apache/flink/agents/runtime/operator/OperatorUtils.class</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                            
<createDependencyReducedPom>false</createDependencyReducedPom>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git 
a/dist/flink-1.20/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
 
b/dist/flink-1.20/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
new file mode 100644
index 0000000..f8effac
--- /dev/null
+++ 
b/dist/flink-1.20/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+package org.apache.flink.agents.runtime.operator;
+
+import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
+import org.apache.flink.streaming.api.operators.ChainingStrategy;
+
+public class OperatorUtils {
+    public static void setChainStrategy(
+            AbstractStreamOperator<?> operator, ChainingStrategy strategy) {
+        operator.setChainingStrategy(strategy);
+    }
+}
diff --git 
a/dist/flink-1.20/src/test/java/org/apache/flink/agents/runtime/operator/OperatorUtilsTest.java
 
b/dist/flink-1.20/src/test/java/org/apache/flink/agents/runtime/operator/OperatorUtilsTest.java
new file mode 100644
index 0000000..5b70ba6
--- /dev/null
+++ 
b/dist/flink-1.20/src/test/java/org/apache/flink/agents/runtime/operator/OperatorUtilsTest.java
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+package org.apache.flink.agents.runtime.operator;
+
+import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
+import org.apache.flink.streaming.api.operators.ChainingStrategy;
+import org.apache.flink.streaming.api.operators.StreamMap;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/** Test for {@link OperatorUtils}. */
+public class OperatorUtilsTest {
+
+    @Test
+    void testSetChainStrategyAlways() {
+        // Create a test operator
+        TestOperator operator = new TestOperator();
+
+        // Initially, the chaining strategy should be HEAD (default)
+        
assertThat(operator.getChainingStrategy()).isEqualTo(ChainingStrategy.HEAD);
+
+        // Set chaining strategy to ALWAYS
+        OperatorUtils.setChainStrategy(operator, ChainingStrategy.ALWAYS);
+
+        // Verify the strategy was set correctly
+        
assertThat(operator.getChainingStrategy()).isEqualTo(ChainingStrategy.ALWAYS);
+    }
+
+    @Test
+    void testSetChainStrategyNever() {
+        // Create a test operator
+        TestOperator operator = new TestOperator();
+
+        // Set chaining strategy to NEVER
+        OperatorUtils.setChainStrategy(operator, ChainingStrategy.NEVER);
+
+        // Verify the strategy was set correctly
+        
assertThat(operator.getChainingStrategy()).isEqualTo(ChainingStrategy.NEVER);
+    }
+
+    @Test
+    void testSetChainStrategyHead() {
+        // Create a test operator
+        TestOperator operator = new TestOperator();
+
+        // First set to ALWAYS
+        OperatorUtils.setChainStrategy(operator, ChainingStrategy.ALWAYS);
+        
assertThat(operator.getChainingStrategy()).isEqualTo(ChainingStrategy.ALWAYS);
+
+        // Then change back to HEAD
+        OperatorUtils.setChainStrategy(operator, ChainingStrategy.HEAD);
+
+        // Verify the strategy was updated correctly
+        
assertThat(operator.getChainingStrategy()).isEqualTo(ChainingStrategy.HEAD);
+    }
+
+    @Test
+    void testSetChainStrategyWithDifferentOperators() {
+        // Test with StreamMap operator
+        StreamMap<String, String> mapOperator = new StreamMap<>(value -> 
value.toUpperCase());
+
+        // Set chaining strategy
+        OperatorUtils.setChainStrategy(mapOperator, ChainingStrategy.ALWAYS);
+
+        // Verify the strategy was set correctly
+        
assertThat(mapOperator.getChainingStrategy()).isEqualTo(ChainingStrategy.ALWAYS);
+    }
+
+    /** Simple test operator for testing purposes. */
+    private static class TestOperator extends AbstractStreamOperator<String> {}
+}
diff --git a/dist/flink-2.0/pom.xml b/dist/flink-2.0/pom.xml
new file mode 100644
index 0000000..2b306ff
--- /dev/null
+++ b/dist/flink-2.0/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.apache.flink</groupId>
+        <artifactId>flink-agents-dist</artifactId>
+        <version>0.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flink-agents-dist-flink-2.0</artifactId>
+    <name>Flink Agents : Dist : Flink 2.0</name>
+
+    <properties>
+        <flink.version>${flink.2.0.version}</flink.version>
+    </properties>
+
+    <dependencies>
+        <!-- Flink dependencies -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-streaming-java</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-runtime</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-clients</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-table-api-java</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-table-api-java-bridge</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-python</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- Copy the shared LICENSE file from the parent directory -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-shared-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    
<directory>${project.parent.basedir}/src/main/resources</directory>
+                                    <includes>
+                                        <include>META-INF/**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Shade plugin configuration inherits from the parent pom 
(dist/pom.xml) -->
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/dist/flink-2.1/pom.xml b/dist/flink-2.1/pom.xml
new file mode 100644
index 0000000..da90342
--- /dev/null
+++ b/dist/flink-2.1/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.apache.flink</groupId>
+        <artifactId>flink-agents-dist</artifactId>
+        <version>0.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flink-agents-dist-flink-2.1</artifactId>
+    <name>Flink Agents : Dist : Flink 2.1</name>
+
+    <properties>
+        <flink.version>${flink.2.1.version}</flink.version>
+    </properties>
+
+    <dependencies>
+        <!-- Flink dependencies -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-streaming-java</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-runtime</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-clients</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-table-api-java</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-table-api-java-bridge</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-python</artifactId>
+            <version>${flink.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- Copy the shared LICENSE file from the parent directory -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-shared-resources</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    
<directory>${project.parent.basedir}/src/main/resources</directory>
+                                    <includes>
+                                        <include>META-INF/**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Shade plugin configuration inherits from the parent pom 
(dist/pom.xml) -->
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/dist/pom.xml b/dist/flink-2.2/pom.xml
similarity index 53%
copy from dist/pom.xml
copy to dist/flink-2.2/pom.xml
index b12ce6b..a328c69 100644
--- a/dist/pom.xml
+++ b/dist/flink-2.2/pom.xml
@@ -21,56 +21,39 @@ under the License.
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.flink</groupId>
-        <artifactId>flink-agents</artifactId>
+        <artifactId>flink-agents-dist</artifactId>
         <version>0.2-SNAPSHOT</version>
     </parent>
 
-    <artifactId>flink-agents-dist</artifactId>
-    <name>Flink Agents : Dist</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-agents-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-agents-plan</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-agents-runtime</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            
<artifactId>flink-agents-integrations-chat-models-ollama</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
+    <artifactId>flink-agents-dist-flink-2.2</artifactId>
+    <name>Flink Agents : Dist : Flink 2.2</name>
 
     <build>
         <plugins>
-            <!-- Build uber jar -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
+                <artifactId>maven-resources-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>shade-flink-agents</id>
-                        <phase>package</phase>
+                        <id>copy-shared-resources</id>
+                        <phase>generate-resources</phase>
                         <goals>
-                            <goal>shade</goal>
+                            <goal>copy-resources</goal>
                         </goals>
                         <configuration>
-                            <shadeTestJar>false</shadeTestJar>
-                            
<finalName>${project.artifactId}-${project.version}</finalName>
+                            
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    
<directory>${project.parent.basedir}/src/main/resources</directory>
+                                    <includes>
+                                        <include>META-INF/**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
diff --git a/dist/pom.xml b/dist/pom.xml
index b12ce6b..225c368 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -27,6 +27,21 @@ under the License.
 
     <artifactId>flink-agents-dist</artifactId>
     <name>Flink Agents : Dist</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <flink.1.20.version>1.20.3</flink.1.20.version>
+        <flink.2.0.version>2.0.1</flink.2.0.version>
+        <flink.2.1.version>2.1.1</flink.2.1.version>
+        <flink.2.2.version>2.2.0</flink.2.2.version>
+    </properties>
+
+    <modules>
+        <module>flink-1.20</module>
+        <module>flink-2.0</module>
+        <module>flink-2.1</module>
+        <module>flink-2.2</module>
+    </modules>
 
     <dependencies>
         <dependency>
@@ -66,7 +81,17 @@ under the License.
                         </goals>
                         <configuration>
                             <shadeTestJar>false</shadeTestJar>
-                            
<finalName>${project.artifactId}-${project.version}</finalName>
+                            
<shadedArtifactAttached>false</shadedArtifactAttached>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/*.SF</exclude>
+                                        <exclude>META-INF/*.DSA</exclude>
+                                        <exclude>META-INF/*.RSA</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/pom.xml b/pom.xml
index 954cae7..00ecbd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,20 +41,7 @@ under the License.
         <maven.compiler.target>${target.java.version}</maven.compiler.target>
         <spotless.version>2.27.1</spotless.version>
         <spotless.skip>false</spotless.skip>
-
-        <!-- ============================================ -->
-        <!-- Flink Version Management                     -->
-        <!-- ============================================ -->
-        <!-- Supported Flink versions -->
-        <flink.1.20.version>1.20.3</flink.1.20.version>
-        <flink.2.0.version>2.0.1</flink.2.0.version>
-        <flink.2.1.version>2.1.1</flink.2.1.version>
-        <flink.2.2.version>2.2.0</flink.2.2.version>
-
-        <!-- Default version used in main modules -->
-        <flink.version>${flink.2.2.version}</flink.version>
-        <!-- ============================================ -->
-
+        <flink.version>2.2.0</flink.version>
         <kafka.version>4.0.0</kafka.version>
         <junit5.version>5.10.1</junit5.version>
         <jackson.version>2.18.2</jackson.version>
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 4a210c5..0dcafb8 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -121,16 +121,25 @@ under the License.
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>${slf4j.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>${log4j2.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
             <version>${log4j2.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-slf4j-impl</artifactId>
             <version>${log4j2.version}</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 
diff --git 
a/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
index 544f24b..d44d0b8 100644
--- 
a/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
+++ 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java
@@ -69,6 +69,7 @@ import org.apache.flink.runtime.state.VoidNamespaceSerializer;
 import org.apache.flink.streaming.api.graph.StreamConfig;
 import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
 import org.apache.flink.streaming.api.operators.BoundedOneInput;
+import org.apache.flink.streaming.api.operators.ChainingStrategy;
 import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
 import org.apache.flink.streaming.api.operators.Output;
 import org.apache.flink.streaming.api.operators.StreamingRuntimeContext;
@@ -207,9 +208,11 @@ public class ActionExecutionOperator<IN, OUT> extends 
AbstractStreamOperator<OUT
         this.actionStateStore = actionStateStore;
         this.checkpointIdToSeqNums = new HashMap<>();
         this.actionTaskMemoryContexts = new HashMap<>();
+        OperatorUtils.setChainStrategy(this, ChainingStrategy.ALWAYS);
     }
 
-    protected void setup(
+    @Override
+    public void setup(
             StreamTask<?, ?> containingTask,
             StreamConfig config,
             Output<StreamRecord<OUT>> output) {
diff --git 
a/runtime/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
new file mode 100644
index 0000000..4f4f047
--- /dev/null
+++ 
b/runtime/src/main/java/org/apache/flink/agents/runtime/operator/OperatorUtils.java
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.flink.agents.runtime.operator;
+
+import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
+import org.apache.flink.streaming.api.operators.ChainingStrategy;
+
+public class OperatorUtils {
+    public static void setChainStrategy(
+            AbstractStreamOperator<?> operator, ChainingStrategy strategy) {}
+}

Reply via email to