markusthoemmes commented on a change in pull request #2948: Programmatic lazy
creation of completedN and invokerN topics
URL:
https://github.com/apache/incubator-openwhisk/pull/2948#discussion_r149889202
##########
File path:
core/controller/src/main/scala/whisk/core/loadBalancer/LoadBalancerService.scala
##########
@@ -341,11 +341,17 @@ class LoadBalancerService(config: WhiskConfig, instance:
InstanceId, entityStore
object LoadBalancerService {
def requiredProperties =
- kafkaHost ++ Map(
- loadbalancerInvokerBusyThreshold -> null,
- controllerBlackboxFraction -> null,
- controllerLocalBookkeeping -> null,
- controllerSeedNodes -> null)
+ kafkaHost ++
+ Map(
+ kafkaTopicsCompletedRetentionBytes -> (1024 * 1024 * 1024).toString(),
// default is 1024 MB
+ kafkaTopicsCompletedRetentionMS -> (1 * 3600 * 1000).toString(), //
default is 1 hour
+ kafkaTopicsCompletedSegmentBytes -> (512 * 1024 * 1024).toString() //
default is 512 MB
Review comment:
We have some helpers here:
```scala
import scala.concurrent.duration._
import whisk.core.entity.size._
1024.MB.toBytes
1.hour.toMillis
512.MB.toBytes
```
Also Scala nit: For non sideeffecting accessor-like methods, you can usually
omit `()`, `toString` in this case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services