sijie commented on a change in pull request #4174: [go function] support 
localrun and cluster mode for go function
URL: https://github.com/apache/pulsar/pull/4174#discussion_r279894268
 
 

 ##########
 File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java
 ##########
 @@ -89,31 +91,180 @@
             if (StringUtils.isNotEmpty(extraDependenciesDir)) {
                 args.add("PYTHONPATH=${PYTHONPATH}:" + extraDependenciesDir);
             }
+        } else if (instanceConfig.getFunctionDetails().getRuntime() == 
Function.FunctionDetails.Runtime.GO) {
+            //no-op
         }
 
         return args;
     }
 
+    /**
+     *
+     * Different from python and java function, Go function uploads a complete 
executable file(including:
+     * instance file + user code file). Its parameter list is provided to the 
broker in the form of a yaml file,
+     * the advantage of this approach is that backward compatibility is 
guaranteed.
 
 Review comment:
   if you shipped a go instance with `--flag1` and `--flag2`. the instance is 
compiled with user code. If a new broker introduce a new flag for running 
instance `--flag3`. The old go function (instance compiled with user code) 
doesn't know `--flag3`. so this instance can not run with new broker code. so 
you can't upgrade the broker.
   
   in what @wolfstudy 's approach, the parameters is not passing from command 
lines from broker (function worker) to instance. instead it is using an 
instance conf file. so there is no need to change command line arguments for go 
instance. It becomes easier to add fields to a yaml file, because ignoring new 
(unknown) fields in yaml is much easier.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to