srkukarni commented on a change in pull request #2518: Add CLI to get function
status of a specific instance
URL: https://github.com/apache/incubator-pulsar/pull/2518#discussion_r215128833
##########
File path:
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java
##########
@@ -872,9 +872,16 @@ void runCmd() throws Exception {
@Parameters(commandDescription = "Check the current status of a Pulsar
Function")
class GetFunctionStatus extends FunctionCommand {
+
+ @Parameter(names = "--instance-id", description = "The function
instanceId (Get-status of all instances if instance-id is not provided")
+ protected String instanceId;
+
@Override
void runCmd() throws Exception {
- String json =
Utils.printJson(admin.functions().getFunctionStatus(tenant, namespace,
functionName));
+ String json = Utils.printJson(
+ isNotBlank(instanceId) ?
admin.functions().getFunctionStatus(tenant, namespace, functionName)
Review comment:
shouldn't it be the other way around
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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