Skip to content

Commit 2f6829a

Browse files
committed
Apply comments.
1 parent 9d4bb24 commit 2f6829a

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

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

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class FPCPoolBalancer(config: WhiskConfig,
297297

298298
case _ =>
299299
activationFeed ! MessageFeed.Processed
300-
logging.error(this, s"Unexpected Acknowledgment message received by loadbalancer: $raw")
300+
logging.warn(this, s"Unexpected Acknowledgment message received by loadbalancer: $raw")
301301
}
302302
}
303303

@@ -673,25 +673,6 @@ object FPCPoolBalancer extends LoadBalancerProvider {
673673
*/
674674
def rng(mod: Int): Int = ThreadLocalRandom.current().nextInt(mod)
675675

676-
/**
677-
* Assign an invoker to a message
678-
*
679-
* @param invokers Invoker pool
680-
* @param minMemory Minimum memory for all invokers
681-
* @return Assigned an invoker
682-
*/
683-
// TODO add input/output example
684-
def schedule(invokers: IndexedSeq[InvokerHealth], minMemory: ByteSize): Option[InvokerInstanceId] = {
685-
val availableInvokers = invokers.filter(i => i.status.isUsable && i.id.userMemory >= minMemory)
686-
val numInvokers = availableInvokers.size
687-
if (numInvokers > 0) {
688-
val invoker = availableInvokers(rng(numInvokers))
689-
Some(invoker.id)
690-
} else {
691-
None
692-
}
693-
}
694-
695676
/**
696677
* Assign a scheduler to a message, return the scheduler which has least queues
697678
*

0 commit comments

Comments
 (0)