rabbah commented on a change in pull request #3855: Add invoker container name to health protocol URL: https://github.com/apache/incubator-openwhisk/pull/3855#discussion_r201707158
########## File path: common/scala/src/main/scala/whisk/core/entity/InstanceId.scala ########## @@ -21,8 +21,19 @@ import spray.json.DefaultJsonProtocol import whisk.core.entity.ControllerInstanceId.LEGAL_CHARS import whisk.core.entity.ControllerInstanceId.MAX_NAME_LENGTH -case class InvokerInstanceId(val instance: Int, name: Option[String] = None) { +/** + * An instance id representing an invoker + * + * @param instance a numeric value used for the load balancing and Kafka topic creation + * @param uniqueName an identifier required for dynamic instance assignment by Zookeeper + * @param displayedName an identifier that is required for the health protocol to correlate Kafka topics with invoker container names + */ +case class InvokerInstanceId(val instance: Int, + uniqueName: Option[String] = None, + displayedName: Option[String] = None) { def toInt: Int = instance + + override def toString: String = (Seq("invoker" + instance) ++ uniqueName ++ displayedName).mkString("/") Review comment: perhaps add `asString` as well (asString = toString) to use here instead https://github.com/apache/incubator-openwhisk/pull/3855/files#diff-21928219385e4e0fe9b1d25e26bf2eb1R149. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services