Skip to content

Improve parameter checking in pulsar-perf #11983

@yuruguo

Description

@yuruguo

Is your enhancement request related to a problem? Please describe.
When I execute pulsar-perf to simulate pub/sub test, I found that the task can be started normally after some options are set to unreasonable values, but there is no instance running, which leads to a waste of resources.
In fact, when these unreasonable values appear, we should check to prevent the task from starting.
case 1:
./bin/pulsar-perf consume --num-consumers -1 test
Task can be started but there is no consumption instance in subscription.
case 2:
./bin/pulsar-perf produce --num-producers -1 test
Task can be started but there is no production instance.

Describe the solution you'd like
Provide a IParameterValidator.class for these option, perform necessary parameter checks before the task starts and exit directly after hitting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions