You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/31 03:26:04 UTC

[GitHub] rabbah commented on a change in pull request #2650: Apply standard scala formatting.

rabbah commented on a change in pull request #2650: Apply standard scala formatting.
URL: https://github.com/apache/incubator-openwhisk/pull/2650#discussion_r136238763
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/WhiskConfig.scala
 ##########
 @@ -34,189 +34,195 @@ import whisk.common.Logging
  * @param optionalProperties a set of optional properties (which may not be defined).
  * @param whiskPropertiesFile a File object, the whisk.properties file, which if given contains the property values.
  */
-
-class WhiskConfig(
-    requiredProperties: Map[String, String],
-    optionalProperties: Set[String] = Set(),
-    propertiesFile: File = null,
-    env: Map[String, String] = sys.env)(implicit val logging: Logging)
+class WhiskConfig(requiredProperties: Map[String, String],
+                  optionalProperties: Set[String] = Set(),
+                  propertiesFile: File = null,
+                  env: Map[String, String] = sys.env)(implicit val logging: Logging)
     extends Config(requiredProperties, optionalProperties)(env) {
 
-    /**
-     * Loads the properties as specified above.
-     *
-     * @return a pair which is the Map defining the properties, and a boolean indicating whether validation succeeded.
-     */
-    override protected def getProperties() = {
-        val properties = super.getProperties()
-        WhiskConfig.readPropertiesFromFile(properties, Option(propertiesFile) getOrElse (WhiskConfig.whiskPropertiesFile))
-        properties
-    }
-
-    val servicePort = this(WhiskConfig.servicePort)
-    val dockerRegistry = this(WhiskConfig.dockerRegistry)
-    val dockerEndpoint = this(WhiskConfig.dockerEndpoint)
-    val dockerPort = this(WhiskConfig.dockerPort)
-
-    val dockerImagePrefix = this(WhiskConfig.dockerImagePrefix)
-    val dockerImageTag = this(WhiskConfig.dockerImageTag)
-
-    val invokerContainerNetwork = this(WhiskConfig.invokerContainerNetwork)
-    val invokerContainerPolicy = if (this(WhiskConfig.invokerContainerPolicy) == "") None else Some(this(WhiskConfig.invokerContainerPolicy))
-    val invokerContainerDns = if (this(WhiskConfig.invokerContainerDns) == "") Seq() else this(WhiskConfig.invokerContainerDns).split(" ").toSeq
-    val invokerNumCore = this(WhiskConfig.invokerNumCore)
-    val invokerCoreShare = this(WhiskConfig.invokerCoreShare)
-
-    val wskApiHost = this(WhiskConfig.wskApiProtocol) + "://" + this(WhiskConfig.wskApiHostname) + ":" + this(WhiskConfig.wskApiPort)
-    val controllerBlackboxFraction = this.getAsDouble(WhiskConfig.controllerBlackboxFraction, 0.10)
-    val loadbalancerInvokerBusyThreshold = this.getAsInt(WhiskConfig.loadbalancerInvokerBusyThreshold, 16)
-    val controllerInstances = this(WhiskConfig.controllerInstances)
-
-    val edgeHost = this(WhiskConfig.edgeHostName) + ":" + this(WhiskConfig.edgeHostApiPort)
-    val kafkaHost = this(WhiskConfig.kafkaHostName) + ":" + this(WhiskConfig.kafkaHostPort)
-
-    val edgeHostName = this(WhiskConfig.edgeHostName)
-
-    val zookeeperHost = this(WhiskConfig.zookeeperHostName) + ":" + this(WhiskConfig.zookeeperHostPort)
-    val invokerHosts = this(WhiskConfig.invokerHostsList)
-
-    val dbProvider = this(WhiskConfig.dbProvider)
-    val dbUsername = this(WhiskConfig.dbUsername)
-    val dbPassword = this(WhiskConfig.dbPassword)
-    val dbProtocol = this(WhiskConfig.dbProtocol)
-    val dbHost = this(WhiskConfig.dbHost)
-    val dbPort = this(WhiskConfig.dbPort)
-    val dbWhisk = this(WhiskConfig.dbWhisk)
-    val dbAuths = this(WhiskConfig.dbAuths)
-    val dbActivations = this(WhiskConfig.dbActivations)
-    val dbPrefix = this(WhiskConfig.dbPrefix)
-
-    val mainDockerEndpoint = this(WhiskConfig.mainDockerEndpoint)
-
-    val runtimesManifest = this(WhiskConfig.runtimesManifest)
-
-    val actionInvokePerMinuteLimit = this(WhiskConfig.actionInvokePerMinuteLimit)
-    val actionInvokeConcurrentLimit = this(WhiskConfig.actionInvokeConcurrentLimit)
-    val triggerFirePerMinuteLimit = this(WhiskConfig.triggerFirePerMinuteLimit)
-    val actionInvokeSystemOverloadLimit = this(WhiskConfig.actionInvokeSystemOverloadLimit)
-    val actionSequenceLimit = this(WhiskConfig.actionSequenceMaxLimit)
+  /**
+   * Loads the properties as specified above.
+   *
+   * @return a pair which is the Map defining the properties, and a boolean indicating whether validation succeeded.
+   */
+  override protected def getProperties() = {
+    val properties = super.getProperties()
+    WhiskConfig.readPropertiesFromFile(properties, Option(propertiesFile) getOrElse (WhiskConfig.whiskPropertiesFile))
+    properties
+  }
+
+  val servicePort = this(WhiskConfig.servicePort)
+  val dockerRegistry = this(WhiskConfig.dockerRegistry)
+  val dockerEndpoint = this(WhiskConfig.dockerEndpoint)
+  val dockerPort = this(WhiskConfig.dockerPort)
+
+  val dockerImagePrefix = this(WhiskConfig.dockerImagePrefix)
+  val dockerImageTag = this(WhiskConfig.dockerImageTag)
+
+  val invokerContainerNetwork = this(WhiskConfig.invokerContainerNetwork)
+  val invokerContainerPolicy =
+    if (this(WhiskConfig.invokerContainerPolicy) == "") None
+    else Some(this(WhiskConfig.invokerContainerPolicy))
+  val invokerContainerDns =
+    if (this(WhiskConfig.invokerContainerDns) == "") Seq()
+    else this(WhiskConfig.invokerContainerDns).split(" ").toSeq
+  val invokerNumCore = this(WhiskConfig.invokerNumCore)
+  val invokerCoreShare = this(WhiskConfig.invokerCoreShare)
+
+  val wskApiHost = this(WhiskConfig.wskApiProtocol) + "://" + this(WhiskConfig.wskApiHostname) + ":" + this(
 
 Review comment:
   eh
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services