Cluster config setting to disable jmx, see #2531

This commit is contained in:
Patrik Nordwall 2012-09-20 08:09:01 +02:00
parent 7b06ee5705
commit 068335789c
5 changed files with 12 additions and 3 deletions

View file

@ -27,6 +27,9 @@ akka {
# in case of network partition.
auto-down = off
# Enable or disable JMX MBeans for management of the cluster
jmx.enabled = on
# how long should the node wait before starting the periodic tasks maintenance tasks?
periodic-tasks-initial-delay = 1s

View file

@ -160,8 +160,11 @@ class Cluster(val system: ExtendedActorSystem) extends Extension {
system.registerOnTermination(shutdown())
private val clusterJmx = new ClusterJmx(this, log)
clusterJmx.createMBean()
private val clusterJmx: Option[ClusterJmx] = {
val jmx = new ClusterJmx(this, log)
jmx.createMBean()
Some(jmx)
}
log.info("Cluster Node [{}] - has started up successfully", selfAddress)
@ -237,7 +240,7 @@ class Cluster(val system: ExtendedActorSystem) extends Extension {
scheduler.close()
clusterJmx.unregisterMBean()
clusterJmx foreach { _.unregisterMBean() }
log.info("Cluster Node [{}] - Cluster node successfully shut down", selfAddress)
}

View file

@ -36,6 +36,7 @@ class ClusterSettings(val config: Config, val systemName: String) {
final val PublishStatsInterval: FiniteDuration = Duration(getMilliseconds("akka.cluster.publish-stats-interval"), MILLISECONDS)
final val AutoJoin: Boolean = getBoolean("akka.cluster.auto-join")
final val AutoDown: Boolean = getBoolean("akka.cluster.auto-down")
final val JmxEnabled: Boolean = getBoolean("akka.cluster.jmx.enabled")
final val JoinTimeout: FiniteDuration = Duration(getMilliseconds("akka.cluster.join-timeout"), MILLISECONDS)
final val UseDispatcher: String = getString("akka.cluster.use-dispatcher") match {
case "" Dispatchers.DefaultDispatcherId

View file

@ -33,6 +33,7 @@ object MultiNodeClusterSpec {
akka.cluster {
auto-join = on
auto-down = off
jmx.enabled = off
gossip-interval = 200 ms
heartbeat-interval = 400 ms
leader-actions-interval = 200 ms

View file

@ -35,6 +35,7 @@ class ClusterConfigSpec extends AkkaSpec {
JoinTimeout must be(60 seconds)
AutoJoin must be(true)
AutoDown must be(false)
JmxEnabled must be(true)
UseDispatcher must be(Dispatchers.DefaultDispatcherId)
GossipDifferentViewProbability must be(0.8 plusOrMinus 0.0001)
MaxGossipMergeRate must be(5.0 plusOrMinus 0.0001)