format source with scalafmt
This commit is contained in:
parent
0f40491d42
commit
ce404e4f53
1669 changed files with 43208 additions and 35404 deletions
|
|
@ -24,7 +24,7 @@ trait ClusterMetricsCommonConfig extends MultiNodeConfig {
|
|||
def nodeList = Seq(node1, node2, node3, node4, node5)
|
||||
|
||||
// Extract individual sigar library for every node.
|
||||
nodeList foreach { role =>
|
||||
nodeList.foreach { role =>
|
||||
nodeConfig(role) {
|
||||
parseString(s"akka.cluster.metrics.native-library-extract-folder=$${user.dir}/target/native/" + role.name)
|
||||
}
|
||||
|
|
@ -49,24 +49,20 @@ trait ClusterMetricsCommonConfig extends MultiNodeConfig {
|
|||
object ClusterMetricsDisabledConfig extends ClusterMetricsCommonConfig {
|
||||
|
||||
commonConfig {
|
||||
Seq(
|
||||
customLogging,
|
||||
disableMetricsExtension,
|
||||
debugConfig(on = false),
|
||||
MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet)
|
||||
.reduceLeft(_ withFallback _)
|
||||
Seq(customLogging,
|
||||
disableMetricsExtension,
|
||||
debugConfig(on = false),
|
||||
MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet).reduceLeft(_.withFallback(_))
|
||||
}
|
||||
}
|
||||
|
||||
object ClusterMetricsEnabledConfig extends ClusterMetricsCommonConfig {
|
||||
|
||||
commonConfig {
|
||||
Seq(
|
||||
customLogging,
|
||||
enableMetricsExtension,
|
||||
debugConfig(on = false),
|
||||
MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet)
|
||||
.reduceLeft(_ withFallback _)
|
||||
Seq(customLogging,
|
||||
enableMetricsExtension,
|
||||
debugConfig(on = false),
|
||||
MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet).reduceLeft(_.withFallback(_))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -77,8 +73,10 @@ class ClusterMetricsEnabledMultiJvmNode3 extends ClusterMetricsEnabledSpec
|
|||
class ClusterMetricsEnabledMultiJvmNode4 extends ClusterMetricsEnabledSpec
|
||||
class ClusterMetricsEnabledMultiJvmNode5 extends ClusterMetricsEnabledSpec
|
||||
|
||||
abstract class ClusterMetricsEnabledSpec extends MultiNodeSpec(ClusterMetricsEnabledConfig)
|
||||
with MultiNodeClusterSpec with RedirectLogging {
|
||||
abstract class ClusterMetricsEnabledSpec
|
||||
extends MultiNodeSpec(ClusterMetricsEnabledConfig)
|
||||
with MultiNodeClusterSpec
|
||||
with RedirectLogging {
|
||||
import ClusterMetricsEnabledConfig._
|
||||
|
||||
def isSigar(collector: MetricsCollector): Boolean = collector.isInstanceOf[SigarMetricsCollector]
|
||||
|
|
@ -89,7 +87,9 @@ abstract class ClusterMetricsEnabledSpec extends MultiNodeSpec(ClusterMetricsEna
|
|||
val conf = cluster.system.settings.config
|
||||
val text = conf.root.render
|
||||
val file = new File(s"target/${myself.name}_application.conf")
|
||||
Some(new PrintWriter(file)) map { p => p.write(text); p.close }
|
||||
Some(new PrintWriter(file)).map { p =>
|
||||
p.write(text); p.close
|
||||
}
|
||||
}
|
||||
|
||||
saveApplicationConf()
|
||||
|
|
@ -98,17 +98,17 @@ abstract class ClusterMetricsEnabledSpec extends MultiNodeSpec(ClusterMetricsEna
|
|||
|
||||
"Cluster metrics" must {
|
||||
"periodically collect metrics on each node, publish to the event stream, " +
|
||||
"and gossip metrics around the node ring" in within(60 seconds) {
|
||||
awaitClusterUp(roles: _*)
|
||||
enterBarrier("cluster-started")
|
||||
awaitAssert(clusterView.members.count(_.status == MemberStatus.Up) should ===(roles.size))
|
||||
// TODO ensure same contract
|
||||
//awaitAssert(clusterView.clusterMetrics.size should ===(roles.size))
|
||||
awaitAssert(metricsView.clusterMetrics.size should ===(roles.size))
|
||||
val collector = MetricsCollector(cluster.system)
|
||||
collector.sample.metrics.size should be > (3)
|
||||
enterBarrier("after")
|
||||
}
|
||||
"and gossip metrics around the node ring" in within(60 seconds) {
|
||||
awaitClusterUp(roles: _*)
|
||||
enterBarrier("cluster-started")
|
||||
awaitAssert(clusterView.members.count(_.status == MemberStatus.Up) should ===(roles.size))
|
||||
// TODO ensure same contract
|
||||
//awaitAssert(clusterView.clusterMetrics.size should ===(roles.size))
|
||||
awaitAssert(metricsView.clusterMetrics.size should ===(roles.size))
|
||||
val collector = MetricsCollector(cluster.system)
|
||||
collector.sample.metrics.size should be > (3)
|
||||
enterBarrier("after")
|
||||
}
|
||||
"reflect the correct number of node metrics in cluster view" in within(30 seconds) {
|
||||
runOn(node2) {
|
||||
cluster.leave(node1)
|
||||
|
|
@ -131,8 +131,10 @@ class ClusterMetricsDisabledMultiJvmNodv3 extends ClusterMetricsDisabledSpec
|
|||
class ClusterMetricsDisabledMultiJvmNode4 extends ClusterMetricsDisabledSpec
|
||||
class ClusterMetricsDisabledMultiJvmNode5 extends ClusterMetricsDisabledSpec
|
||||
|
||||
abstract class ClusterMetricsDisabledSpec extends MultiNodeSpec(ClusterMetricsDisabledConfig)
|
||||
with MultiNodeClusterSpec with RedirectLogging {
|
||||
abstract class ClusterMetricsDisabledSpec
|
||||
extends MultiNodeSpec(ClusterMetricsDisabledConfig)
|
||||
with MultiNodeClusterSpec
|
||||
with RedirectLogging {
|
||||
|
||||
val metricsView = new ClusterMetricsView(cluster.system)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue