From a83f24f9926e4a2830db42adedbead5c9c55e44c Mon Sep 17 00:00:00 2001 From: Grace Grimwood <15976368+gracegrimwood@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:58:13 +1300 Subject: [PATCH] [FLINK-36510][rpc] Bump Pekko to 1.1.2, remove Netty 3 Signed-off-by: Grace Grimwood --- flink-rpc/flink-rpc-akka/pom.xml | 14 ++++++++++---- .../rpc/pekko/ActorSystemBootstrapTools.java | 4 +++- .../flink/runtime/rpc/pekko/PekkoUtils.java | 5 +++-- .../src/main/resources/META-INF/NOTICE | 18 +++++++++--------- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/flink-rpc/flink-rpc-akka/pom.xml b/flink-rpc/flink-rpc-akka/pom.xml index a46437e29268f..2f2f3ef4a65ae 100644 --- a/flink-rpc/flink-rpc-akka/pom.xml +++ b/flink-rpc/flink-rpc-akka/pom.xml @@ -37,7 +37,7 @@ under the License. - 1.0.1 + 1.1.2 2.12 2.12.16 @@ -94,8 +94,8 @@ under the License. io.netty - netty - 3.10.6.Final + netty-all + test ${flink.markBundledAsOptional} @@ -172,9 +172,15 @@ under the License. * + + + io.netty + org.apache.flink.shaded.netty4.io.netty + + - io.netty:netty + io.netty:* diff --git a/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/ActorSystemBootstrapTools.java b/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/ActorSystemBootstrapTools.java index 86ccdca92260e..517a48669e688 100644 --- a/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/ActorSystemBootstrapTools.java +++ b/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/ActorSystemBootstrapTools.java @@ -122,7 +122,9 @@ public static ActorSystem startRemoteActorSystem( } catch (Exception e) { // we can continue to try if this contains a netty channel exception Throwable cause = e.getCause(); - if (!(cause instanceof org.jboss.netty.channel.ChannelException + if (!(cause + instanceof + org.apache.flink.shaded.netty4.io.netty.channel.ChannelException || cause instanceof java.net.BindException)) { throw e; } // else fall through the loop and try the next port diff --git a/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/PekkoUtils.java b/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/PekkoUtils.java index 7571c078f8f15..2825c834ffc5b 100644 --- a/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/PekkoUtils.java +++ b/flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/PekkoUtils.java @@ -27,14 +27,15 @@ import org.apache.flink.util.TimeUtils; import org.apache.flink.util.function.FunctionUtils; +import org.apache.flink.shaded.netty4.io.netty.util.internal.logging.InternalLoggerFactory; +import org.apache.flink.shaded.netty4.io.netty.util.internal.logging.Slf4JLoggerFactory; + import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; import org.apache.pekko.actor.ActorRef; import org.apache.pekko.actor.ActorSystem; import org.apache.pekko.actor.Address; import org.apache.pekko.actor.AddressFromURIString; -import org.jboss.netty.logging.InternalLoggerFactory; -import org.jboss.netty.logging.Slf4JLoggerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/flink-rpc/flink-rpc-akka/src/main/resources/META-INF/NOTICE b/flink-rpc/flink-rpc-akka/src/main/resources/META-INF/NOTICE index 8e22639499679..2879cf1d53c6a 100644 --- a/flink-rpc/flink-rpc-akka/src/main/resources/META-INF/NOTICE +++ b/flink-rpc/flink-rpc-akka/src/main/resources/META-INF/NOTICE @@ -6,17 +6,17 @@ The Apache Software Foundation (http://www.apache.org/). This project bundles the following dependencies under the Apache Software License 2.0. (http://www.apache.org/licenses/LICENSE-2.0.txt) -- com.hierynomus:asn-one:0.5.0 +- com.hierynomus:asn-one:0.6.0 - com.typesafe:config:1.4.2 - com.typesafe:ssl-config-core_2.12:0.6.1 -- io.netty:netty:3.10.6.Final -- org.agrona:agrona:1.15.1 -- org.apache.pekko:pekko-actor_2.12:1.0.1 -- org.apache.pekko:pekko-remote_2.12:1.0.1 -- org.apache.pekko:pekko-pki_2.12:1.0.1 -- org.apache.pekko:pekko-protobuf-v3_2.12:1.0.1 -- org.apache.pekko:pekko-slf4j_2.12:1.0.1 -- org.apache.pekko:pekko-stream_2.12:1.0.1 +- io.netty:netty-all:4.1.100.Final +- org.agrona:agrona:1.22.0 +- org.apache.pekko:pekko-actor_2.12:1.1.2 +- org.apache.pekko:pekko-remote_2.12:1.1.2 +- org.apache.pekko:pekko-pki_2.12:1.1.2 +- org.apache.pekko:pekko-protobuf-v3_2.12:1.1.2 +- org.apache.pekko:pekko-slf4j_2.12:1.1.2 +- org.apache.pekko:pekko-stream_2.12:1.1.2 - org.scala-lang:scala-library:2.12.16 The following dependencies all share the same BSD license which you find under licenses/LICENSE.scala.