The migration away from legacy akka remoting to artery tcp.
JIRA: CONTROLLER-1968
Change-Id: Iac1a0186292eb5a303cf075e540f3f6c8c09a932
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import akka.japi.Effect;
import akka.remote.AssociationErrorEvent;
import akka.remote.RemotingLifecycleEvent;
-import akka.remote.ThisActorSystemQuarantinedEvent;
+import akka.remote.artery.ThisActorSystemQuarantinedEvent;
import java.util.HashSet;
import java.util.Set;
import org.slf4j.Logger;
import akka.japi.Effect;
import akka.remote.AssociationErrorEvent;
import akka.remote.InvalidAssociation;
-import akka.remote.ThisActorSystemQuarantinedEvent;
+import akka.remote.UniqueAddress;
+import akka.remote.artery.ThisActorSystemQuarantinedEvent;
import akka.testkit.javadsl.TestKit;
import org.junit.After;
import org.junit.Before;
public void testOnReceiveQuarantined() throws Exception {
final Throwable t = new RuntimeException("Remote has quarantined this system");
final InvalidAssociation cause = InvalidAssociation.apply(LOCAL, REMOTE, t, Option.apply(null));
- final ThisActorSystemQuarantinedEvent event = new ThisActorSystemQuarantinedEvent(LOCAL, REMOTE);
+ final UniqueAddress localAddress = new UniqueAddress(LOCAL, 1);
+ final UniqueAddress remoteAddress = new UniqueAddress(REMOTE, 2);
+ final ThisActorSystemQuarantinedEvent event = new ThisActorSystemQuarantinedEvent(localAddress, remoteAddress);
actor.tell(event, ActorRef.noSender());
verify(callback, timeout(1000)).apply();
}
akka {
remote {
artery {
- enabled = off
+ enabled = on
+ transport = tcp
canonical.hostname = "127.0.0.1"
canonical.port = 2550
}
- classic.netty.tcp {
- hostname = "127.0.0.1"
- port = 2550
- }
# when under load we might trip a false positive on the failure detector
# transport-failure-detector {
# heartbeat-interval = 4 s
}
cluster {
- # Remove ".tcp" when using artery.
- seed-nodes = ["akka.tcp://opendaylight-cluster-data@127.0.0.1:2550"]
+ # Using artery.
+ seed-nodes = ["akka://opendaylight-cluster-data@127.0.0.1:2550"]
roles = [
"member-1"
loggers = ["akka.event.slf4j.Slf4jLogger"]
logger-startup-timeout = 300s
+ # JFR requires boot delegation, which we do not have by default
+ java-flight-recorder {
+ enabled = false
+ }
+
actor {
warn-about-java-serializer-usage = off
provider = "akka.cluster.ClusterActorRefProvider"
}
artery {
+ enabled = on
+ transport = tcp
+
advanced {
- #maximum-frame-size = 256 KiB
+ maximum-frame-size = 400 MiB
#maximum-large-frame-size = 2 MiB
}
}
String peerId = ShardIdentifier.create("default", MEMBER_2, type).toString();
- String address = "akka.tcp://opendaylight-cluster-data@127.0.0.1:2550/user/shardmanager-" + type
+ String address = "akka://opendaylight-cluster-data@127.0.0.1:2550/user/shardmanager-" + type
+ "/" + MEMBER_2.getName() + "-shard-default-" + type;
resolver.setResolved(peerId, address);