You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/02 10:13:39 UTC

[GitHub] [pulsar] wolfstudy commented on a change in pull request #8780: Fix single-quotes added to user-conf

wolfstudy commented on a change in pull request #8780:
URL: https://github.com/apache/pulsar/pull/8780#discussion_r534048235



##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java
##########
@@ -224,11 +226,13 @@
         ObjectMapper objectMapper = ObjectMapperFactory.getThreadLocal();
         String configContent = objectMapper.writeValueAsString(goInstanceConfig);
 
-        // Nit: at present, the implementation of go function depends on pulsar-client-go,
-        // pulsar-client-go uses cgo, so the currently uploaded executable doesn't support cross-compilation.
         args.add(originalCodeFileName);
         args.add("-instance-conf");
-        args.add("'" + configContent + "'");
+        if (k8sRuntime) {

Review comment:
       Go Runtime is different from Python and Java Functions runtime, this is mainly the language itself. Go Runtime separately encapsulates the GoInstanceConfig object to process the data transmitted from FunctionDetails, so we can’t use the methods carried by protobuf itself to parse . In Go Runtime, we use `-instance-conf` to receive and process all parameter information.




----------------------------------------------------------------
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:
users@infra.apache.org