Skip to content

Commit 2e82d87

Browse files
committed
Apply scalaFmt
1 parent 2e585c5 commit 2e82d87

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/FPCPoolBalancer.scala

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -639,17 +639,16 @@ class FPCPoolBalancer(config: WhiskConfig,
639639
MetricEmitter.emitGaugeMetric(UNHEALTHY_INVOKERS, invokers.count(_.status == Unhealthy))
640640
MetricEmitter.emitGaugeMetric(OFFLINE_INVOKERS, invokers.count(_.status == Offline))
641641
// Add both user memory and busy memory because user memory represents free memory in this case
642-
MetricEmitter.emitGaugeMetric(
643-
INVOKER_TOTALMEM,
644-
invokers.foldLeft(0L) { (total, curr) =>
645-
if (curr.status.isUsable) {
646-
curr.id.userMemory.toMB + curr.id.busyMemory.getOrElse(ByteSize(0, SizeUnits.BYTE)).toMB + total
647-
} else {
648-
total
649-
}
650-
})
642+
MetricEmitter.emitGaugeMetric(INVOKER_TOTALMEM, invokers.foldLeft(0L) { (total, curr) =>
643+
if (curr.status.isUsable) {
644+
curr.id.userMemory.toMB + curr.id.busyMemory.getOrElse(ByteSize(0, SizeUnits.BYTE)).toMB + total
645+
} else {
646+
total
647+
}
648+
})
651649
MetricEmitter.emitGaugeMetric(LOADBALANCER_ACTIVATIONS_INFLIGHT(controllerInstance), totalActivations.longValue)
652-
MetricEmitter.emitGaugeMetric(LOADBALANCER_MEMORY_INFLIGHT(controllerInstance, ""), totalActivationMemory.longValue)
650+
MetricEmitter
651+
.emitGaugeMetric(LOADBALANCER_MEMORY_INFLIGHT(controllerInstance, ""), totalActivationMemory.longValue)
653652
})
654653
}
655654

core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/container/ContainerManager.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ class ContainerManager(jobManagerFactory: ActorRefFactory => ActorRef,
251251
// Filter out messages which can use warmed container
252252
private def filterWarmedCreations(msgs: List[ContainerCreationMessage]) = {
253253
msgs.filter { msg =>
254-
val warmedPrefix = containerPrefix(ContainerKeys.warmedPrefix, msg.invocationNamespace, msg.action, Some(msg.revision))
254+
val warmedPrefix =
255+
containerPrefix(ContainerKeys.warmedPrefix, msg.invocationNamespace, msg.action, Some(msg.revision))
255256
val chosenInvoker = warmedContainers
256257
.filter(!inProgressWarmedContainers.values.toSeq.contains(_))
257258
.find { container =>

0 commit comments

Comments
 (0)