freeznet commented on a change in pull request #9318:
URL: https://github.com/apache/pulsar/pull/9318#discussion_r564320957
##########
File path:
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java
##########
@@ -119,7 +119,8 @@
public static List<String> getGoInstanceCmd(InstanceConfig instanceConfig,
String originalCodeFileName,
String pulsarServiceUrl,
- boolean k8sRuntime) throws
IOException {
+ boolean k8sRuntime,
+ int metricsPort) throws
IOException {
Review comment:
I havnt add `metricsPort` to `InstanceConfig` is because `metricsPort`
is generated with different mechanisms for different runtime, such as for
process runtime, `metricsPort` is generated by
`FunctionCommon.findAvailablePort()` but for k8s runtime, `metricsPort` comes
from the config `functions_worker.yml`.
Also, for java and python function, `metricsPort` is also not included in
`InstanceConfig` (ref:
https://github.com/apache/pulsar/blob/7c68ade453136895d19fa4723351d26256f3d624/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java#L249).
I did seem a bit lazy with these changes here, but also want to avoid making
changes to java and python runtime's code. So let me know if we want apply
`metricsPort` into `InstanceConfig`.
----------------------------------------------------------------
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]