Skip to content

Conversation

@wolfstudy
Copy link
Contributor

@wolfstudy wolfstudy commented Sep 3, 2019

Add restart cmd for Pulsar Functions

USED FOR:
    This command is used for restarting function instance.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #Restart function instance
    pulsarctl functions restart
	--tenant public
	--namespace default
	--name <the name of Pulsar Function>

    #Restart function instance with instance ID
    pulsarctl functions restart
	--tenant public
	--namespace default
	--name <the name of Pulsar Function>
	--instance-id 1

    #Restart function instance with FQFN
    pulsarctl functions restart
	--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

OUTPUT:
    #normal output
    Restarted successfully

    #You must specify a name for the Pulsar Functions or a FQFN, please check the --name args
    [✖]  you must specify a name for the function or a Fully Qualified Function Name (FQFN)

    #The name of Pulsar Functions doesn't exist, please check the --name args
    [✖]  code: 404 reason: Function <your function name> doesn't exist

    #Used an instanceID that does not exist or other impermissible actions
    [✖]  code: 400 reason: Operation not permitted

Usage: pulsarctl functions restart [flags]

Aliases: restart, restart

List command as follows:

USED FOR:
    List all Pulsar Functions running under a specific tenant and namespace.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #List all Pulsar Functions running under a specific tenant and namespace
    pulsarctl functions list
	--tenant public
	--namespace default

OUTPUT:
    #normal output
    +--------------------+
    |   Function Name    |
    +--------------------+
    | test_function_name |
    +--------------------+

Usage: pulsarctl functions list [flags]

Aliases: list, list

FunctionsConfig flags:
      --tenant string      The tenant of a Pulsar Function
      --namespace string   The namespace of a Pulsar Function

Get command as follows:

USED FOR:
    Fetch information about a Pulsar Function

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #Fetch information about a Pulsar Function
    pulsarctl functions get
	--tenant public
	--namespace default
	--name <the name of Pulsar Function>

    #Fetch information about a Pulsar Function with FQFN
    pulsarctl functions get
	--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

OUTPUT:
    #normal output
    {
      "tenant": "public",
      "namespace": "default",
      "name": "test-functions",
      "className": "org.apache.pulsar.functions.api.examples.ExclamationFunction",
      "inputSpecs": {
        "persistent://public/default/test-topic-1": {
          "isRegexPattern": false
        }
      },
      "output": "persistent://public/default/test-topic-2",
      "processingGuarantees": "ATLEAST_ONCE",
      "retainOrdering": false,
      "userConfig": {},
      "runtime": "JAVA",
      "autoAck": true,
      "parallelism": 1,
      "resources": {
        "cpu": 1.0,
        "ram": 1073741824,
        "disk": 10737418240
      },
      "cleanupSubscription": true
    }

    #You must specify a name for the Pulsar Functions or a FQFN, please check the --name args
    [✖]  you must specify a name for the function or a Fully Qualified Function Name (FQFN)

    #The name of Pulsar Functions doesn't exist, please check the --name args
    [✖]  code: 404 reason: Function <your function name> doesn't exist

Usage: pulsarctl functions get [flags]

Aliases: get, get

FunctionsConfig flags:
      --fqfn string        The Fully Qualified Function Name (FQFN) for the function
      --tenant string      The tenant of a Pulsar Function
      --namespace string   The namespace of a Pulsar Function
      --name string        The name of a Pulsar Function

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy wolfstudy self-assigned this Sep 3, 2019
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@sijie sijie mentioned this pull request Sep 4, 2019
29 tasks
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy wolfstudy changed the title [WIP] Add restart cmd for Pulsar Functions Add restart, list and get cmd for Pulsar Functions Sep 4, 2019
@wolfstudy wolfstudy requested review from sijie and zymap September 4, 2019 06:28
@wolfstudy
Copy link
Contributor Author

@sijie @zymap PTAL

@wolfstudy wolfstudy merged commit 46dba74 into master Sep 4, 2019
@wolfstudy wolfstudy deleted the xiaolong/restart-pulsar-functions branch September 4, 2019 07:42
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
…arctl#30)

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add restart cmd for Pulsar Functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add list cmd for Pulsar Functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add get cmd for Pulsar functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
…arctl#30)

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add restart cmd for Pulsar Functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add list cmd for Pulsar Functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

* Add get cmd for Pulsar functions

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants