eolivelli commented on a change in pull request #9671:
URL: https://github.com/apache/pulsar/pull/9671#discussion_r580211212
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java
##########
@@ -452,25 +444,28 @@ public synchronized void restartFunctionInstances(String
tenant, String namespac
}
continue;
}
-
- ComponentType componentType =
assignment.getInstance().getFunctionMetaData().getFunctionDetails().getComponentType();
-
- if (ComponentType.SOURCE == componentType) {
- this.functionAdmin.sources().restartSource(tenant,
namespace, functionName,
- assignment.getInstance().getInstanceId());
- } else if (ComponentType.SINK == componentType) {
- this.functionAdmin.sinks().restartSink(tenant,
namespace, functionName,
- assignment.getInstance().getInstanceId());
- } else {
- this.functionAdmin.functions().restartFunction(tenant,
namespace, functionName,
- assignment.getInstance().getInstanceId());
- }
+ restartFunctionByPulsarAdmin(assignment, tenant,
namespace, functionName);
}
}
}
return;
}
+ private void restartFunctionByPulsarAdmin(Assignment assignment, String
tenant, String namespace, String functionName)
Review comment:
what about
`restartFunctionUsingPulsarAdmin` ?
Not a big deal for me, just a suggestion
----------------------------------------------------------------
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]