revert Artery config in akka-sample-cluster-scala

This commit is contained in:
Patrik Nordwall 2016-09-29 13:29:17 +02:00
parent dcd921369c
commit 5558caa1f0
11 changed files with 19 additions and 19 deletions

View file

@ -1,19 +1,20 @@
#//#snippet
akka {
actor {
provider = "cluster"
provider = "akka.cluster.ClusterActorRefProvider"
}
remote.artery {
enabled = on
canonical.hostname = 127.0.0.1
canonical.port = 0
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "127.0.0.1"
port = 0
}
}
cluster {
seed-nodes = [
"akka://ClusterSystem@127.0.0.1:2551",
"akka://ClusterSystem@127.0.0.1:2552"]
"akka.tcp://ClusterSystem@127.0.0.1:2551",
"akka.tcp://ClusterSystem@127.0.0.1:2552"]
#//#snippet
# excluded from snippet
@ -36,4 +37,3 @@ akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
# Note: use per-jvm-instance folder when running multiple jvm on one host.
akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native
#//#snippet

View file

@ -34,7 +34,7 @@ object FactorialBackend {
def main(args: Array[String]): Unit = {
// Override the configuration of the port when specified as program argument
val port = if (args.isEmpty) "0" else args(0)
val config = ConfigFactory.parseString(s"akka.remote.artery.canonical.port=$port").
val config = ConfigFactory.parseString(s"akka.remote.netty.tcp.port=$port").
withFallback(ConfigFactory.parseString("akka.cluster.roles = [backend]")).
withFallback(ConfigFactory.load("factorial"))

View file

@ -15,7 +15,7 @@ object SimpleClusterApp {
def startup(ports: Seq[String]): Unit = {
ports foreach { port =>
// Override the configuration of the port
val config = ConfigFactory.parseString("akka.remote.artery.canonical.port=" + port).
val config = ConfigFactory.parseString("akka.remote.netty.tcp.port=" + port).
withFallback(ConfigFactory.load())
// Create an Akka system

View file

@ -28,7 +28,7 @@ object StatsSample {
ports foreach { port =>
// Override the configuration of the port when specified as program argument
val config =
ConfigFactory.parseString(s"akka.remote.artery.canonical.port=" + port).withFallback(
ConfigFactory.parseString(s"akka.remote.netty.tcp.port=" + port).withFallback(
ConfigFactory.parseString("akka.cluster.roles = [compute]")).
withFallback(ConfigFactory.load("stats1"))

View file

@ -23,7 +23,7 @@ object StatsSampleOneMaster {
ports foreach { port =>
// Override the configuration of the port when specified as program argument
val config =
ConfigFactory.parseString(s"akka.remote.artery.canonical.port=" + port).withFallback(
ConfigFactory.parseString(s"akka.remote.netty.tcp.port=" + port).withFallback(
ConfigFactory.parseString("akka.cluster.roles = [compute]")).
withFallback(ConfigFactory.load("stats2"))

View file

@ -42,7 +42,7 @@ object TransformationBackend {
def main(args: Array[String]): Unit = {
// Override the configuration of the port when specified as program argument
val port = if (args.isEmpty) "0" else args(0)
val config = ConfigFactory.parseString(s"akka.remote.artery.canonical.port=$port").
val config = ConfigFactory.parseString(s"akka.remote.netty.tcp.port=$port").
withFallback(ConfigFactory.parseString("akka.cluster.roles = [backend]")).
withFallback(ConfigFactory.load())

View file

@ -40,7 +40,7 @@ object TransformationFrontend {
def main(args: Array[String]): Unit = {
// Override the configuration of the port when specified as program argument
val port = if (args.isEmpty) "0" else args(0)
val config = ConfigFactory.parseString(s"akka.remote.artery.canonical.port=$port").
val config = ConfigFactory.parseString(s"akka.remote.netty.tcp.port=$port").
withFallback(ConfigFactory.parseString("akka.cluster.roles = [frontend]")).
withFallback(ConfigFactory.load())

View file

@ -48,7 +48,7 @@ object StatsSampleSingleMasterSpecConfig extends MultiNodeConfig {
// note that no fixed host names and ports are used
commonConfig(ConfigFactory.parseString("""
akka.loglevel = INFO
akka.actor.provider = "cluster"
akka.actor.provider = "akka.cluster.ClusterActorRefProvider"
akka.remote.log-remote-lifecycle-events = off
akka.cluster.roles = [compute]
#//#router-deploy-config

View file

@ -40,7 +40,7 @@ object StatsSampleSpecConfig extends MultiNodeConfig {
// this configuration will be used for all nodes
// note that no fixed host names and ports are used
commonConfig(ConfigFactory.parseString("""
akka.actor.provider = "cluster"
akka.actor.provider = "akka.cluster.ClusterActorRefProvider"
akka.remote.log-remote-lifecycle-events = off
akka.cluster.roles = [compute]
#//#router-lookup-config

View file

@ -42,7 +42,7 @@ object TransformationSampleSpecConfig extends MultiNodeConfig {
// this configuration will be used for all nodes
// note that no fixed host names and ports are used
commonConfig(ConfigFactory.parseString("""
akka.actor.provider = "cluster"
akka.actor.provider = "akka.cluster.ClusterActorRefProvider"
akka.remote.log-remote-lifecycle-events = off
"""))

View file

@ -27,7 +27,7 @@ Open <a href="#code/src/main/resources/application.conf" class="shortcut">applic
<p>
To enable cluster capabilities in your Akka project you should, at a minimum, add the remote settings,
and use <code>cluster</code> for <code>akka.actor.provider</code>. The <code>akka.cluster.seed-nodes</code> should
and use <code>akka.cluster.ClusterActorRefProvider</code>. The <code>akka.cluster.seed-nodes</code> should
normally also be added to your application.conf file.
</p>