You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/09/18 10:09:49 UTC

[GitHub] azagrebin commented on a change in pull request #6701: [FLINK-10349] Unify stopActor utils

azagrebin commented on a change in pull request #6701: [FLINK-10349] Unify stopActor utils
URL: https://github.com/apache/flink/pull/6701#discussion_r218364308
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/akka/ActorUtils.java
 ##########
 @@ -87,12 +89,52 @@
 		return FutureUtils.completeAll(terminationFutures);
 	}
 
-	public static void stopActor(AkkaActorGateway akkaActorGateway) {
-		stopActor(akkaActorGateway.actor());
-	}
+	// ---------- Utils to stop an actor ----------
+
+	private static final FiniteDuration DEFAULT_TIMEOUT = FiniteDuration.apply(1, TimeUnit.MINUTES);
 
 	public static void stopActor(ActorRef actorRef) {
-		actorRef.tell(PoisonPill.getInstance(), ActorRef.noSender());
+		if (actorRef != null) {
 
 Review comment:
   I would add a doc comment including how we kill the actor in this implementation

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services