You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2019/06/17 12:12:16 UTC
[flink] branch master updated: [hotfix][akka] Replace deprecated
ExtensionKey
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 8d9f465 [hotfix][akka] Replace deprecated ExtensionKey
8d9f465 is described below
commit 8d9f4654a492d6cb14905c4ebf4f3681d3abf835
Author: tison <wa...@gmail.com>
AuthorDate: Sun Jun 16 20:12:10 2019 +0800
[hotfix][akka] Replace deprecated ExtensionKey
This closes #8752.
---
.../apache/flink/runtime/akka/RemoteAddressExtension.scala | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/RemoteAddressExtension.scala b/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/RemoteAddressExtension.scala
index 79f63de..76721c6 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/RemoteAddressExtension.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/RemoteAddressExtension.scala
@@ -18,15 +18,19 @@
package org.apache.flink.runtime.akka
-import akka.actor.{Address, ExtensionKey, Extension, ExtendedActorSystem}
+import akka.actor.{Address, ExtendedActorSystem, Extension, ExtensionId}
/** [[akka.actor.ActorSystem]] [[Extension]] used to obtain the [[Address]] on which the
* given ActorSystem is listening.
*
- * @param system
+ * @param system this ActorSystem.
*/
-class RemoteAddressExtensionImplementation(system: ExtendedActorSystem) extends Extension {
+class RemoteAddressExtension(system: ExtendedActorSystem) extends Extension {
def address: Address = system.provider.getDefaultAddress
}
-object RemoteAddressExtension extends ExtensionKey[RemoteAddressExtensionImplementation]{}
+object RemoteAddressExtension extends ExtensionId[RemoteAddressExtension]{
+ override def createExtension(system: ExtendedActorSystem): RemoteAddressExtension = {
+ new RemoteAddressExtension(system)
+ }
+}