Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][cli] Fix help option #22408

Merged
merged 1 commit into from
Apr 3, 2024
Merged

[fix][cli] Fix help option #22408

merged 1 commit into from
Apr 3, 2024

Conversation

nodece
Copy link
Member

@nodece nodece commented Apr 3, 2024

Motivation

Right now, the command with -h doesn't work:

❯ ./bin/pulsar initialize-cluster-metadata -h                                                    
picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
Exception in thread "main" picocli.CommandLine$MissingParameterException: Missing required options: '--cluster=<cluster>', '--web-service-url=<clusterWebServiceUrl>'
        at picocli.CommandLine$MissingParameterException.create(CommandLine.java:18661)
        at picocli.CommandLine$MissingParameterException.access$21200(CommandLine.java:18649)
        at picocli.CommandLine$Interpreter.validateConstraints(CommandLine.java:13651)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13614)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13559)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13454)
        at picocli.CommandLine.parseArgs(CommandLine.java:1552)
        at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:205)

Fixed version:

❯ ./bin/pulsar initialize-cluster-metadata -h                                                    
Usage: initialize-cluster-metadata [-gh]
                                   [-bn=<numberOfDefaultNamespaceBundles>]
                                   -c=<cluster>
                                   [-cms=<configurationMetadataStore>]
                                   [--existing-bk-metadata-service-uri=<existing
                                   BkMetadataServiceUri>]
                                   [--initial-num-stream-storage-containers=<num
                                   StreamStorageContainers>]
                                   [--initial-num-transaction-coordinators=<numT
                                   ransactionCoordinators>]
                                   [-md=<metadataStoreUrl>]
                                   [-pp=<clusterProxyProtocol>]
                                   [-pu=<clusterProxyUrl>]
                                   [-tb=<clusterBrokerServiceUrlTls>]
                                   [-tw=<clusterWebServiceUrlTls>]
                                   [-ub=<clusterBrokerServiceUrl>]
                                   -uw=<clusterWebServiceUrl>
                                   [--zookeeper-session-timeout-ms=<zkSessionTim
                                   eoutMillis>]
      -bn, --default-namespace-bundle-number=<numberOfDefaultNamespaceBundles>
                            The bundle numbers for the default namespaces
                              (public/default), default is 16
                              Default: 0
  -c, --cluster=<cluster>   Cluster name
      -cms, --configuration-metadata-store=<configurationMetadataStore>
                            Configuration Metadata Store connection string
      --existing-bk-metadata-service-uri=<existingBkMetadataServiceUri>
                            The metadata service URI of the existing BookKeeper
                              cluster that you want to use
  -g, --generate-docs       Generate docs
  -h, --help                Show this help message
      --initial-num-stream-storage-containers=<numStreamStorageContainers>
                            Num storage containers of BookKeeper stream storage
                              Default: 16
      --initial-num-transaction-coordinators=<numTransactionCoordinators>
                            Num transaction coordinators will assigned in
                              cluster
                              Default: 16
      -md, --metadata-store=<metadataStoreUrl>
                            Metadata Store service url. eg: zk:my-zk:2181
      -pp, --proxy-protocol=<clusterProxyProtocol>
                            Proxy protocol to select type of routing at proxy.
                              Possible Values: [SNI]
      -pu, --proxy-url=<clusterProxyUrl>
                            Proxy-server URL to which to connect.
      -tb, --broker-service-url-tls=<clusterBrokerServiceUrlTls>
                            Broker-service URL for new cluster with TLS
                              encryption
      -tw, --web-service-url-tls=<clusterWebServiceUrlTls>
                            Web-service URL for new cluster with TLS encryption
      -ub, --broker-service-url=<clusterBrokerServiceUrl>
                            Broker-service URL for new cluster
      -uw, --web-service-url=<clusterWebServiceUrl>
                            Web-service URL for new cluster
      --zookeeper-session-timeout-ms=<zkSessionTimeoutMillis>
                            Local zookeeper session timeout ms
                              Default: 30000

Modifications

  • Add usageHelp=true to the -h, --help option to print the help info.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Signed-off-by: Zixuan Liu <[email protected]>
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 3, 2024
@nodece nodece self-assigned this Apr 3, 2024
@nodece nodece added this to the 3.3.0 milestone Apr 3, 2024
@nodece
Copy link
Member Author

nodece commented Apr 3, 2024

/pulsarbot rerun-failure-checks

@nodece nodece merged commit 7e93d34 into apache:master Apr 3, 2024
57 checks passed
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants