ningyougang commented on a change in pull request #5061:
URL: https://github.com/apache/openwhisk/pull/5061#discussion_r570713341
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala
##########
@@ -428,6 +428,61 @@ object EventMessage extends DefaultJsonProtocol {
def parse(msg: String) = Try(format.read(msg.parseJson))
}
+case class InvokerResourceMessage(status: String,
+ freeMemory: Long,
+ busyMemory: Long,
+ inProgressMemory: Long,
+ tags: Seq[String],
Review comment:
This is used for some special actions. e.g. need high memory, need power
gpu.
We can make the action's invocations run on corresponding invokers (BTW,
this requirement comes from user in our company)
* Firstly, add some annotation to the actions, e.g.
```
wsk action create hello-gpu ~/hello-gpu.js --annotation invoker-resources
["gpu"]
```
* Secondly, when deploy invoker, add the relative tag to the invoker as well
```
whisk/invokers/0/0
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":['gpu']}
whisk/invokers/1/1
{"busyMemory":0,"dedicatedNamespaces":[],"freeMemory":10240,"inProgressMemory":0,"status":"up","tags":[]}
```
* Finally, when run the action, the activations for that action will run on
above invoker0 which includes tag: gpu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]