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 2021/02/08 19:47:56 UTC

[GitHub] [pulsar] nlu90 commented on a change in pull request #9519: [Functions] Call the corresponding restart according to the componenttype. #9502

nlu90 commented on a change in pull request #9519:
URL: https://github.com/apache/pulsar/pull/9519#discussion_r572319901



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java
##########
@@ -440,8 +450,19 @@ public synchronized void restartFunctionInstances(String tenant, String namespac
                         }
                         continue;
                     }
-                    this.functionAdmin.functions().restartFunction(tenant, namespace, functionName,
-                                assignment.getInstance().getInstanceId());
+
+                    ComponentType componentType = assignment.getInstance().getFunctionMetaData().getFunctionDetails().getComponentType();

Review comment:
       the code here and on line 422 - 429 are highly similar.
   
   Could you please abstract a method and then reuse it for these two places.




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