tuteng removed a comment on pull request #11262:
URL: https://github.com/apache/pulsar/pull/11262#issuecomment-877534618


   > I'm not sure this is the correct fix. To me it complicates things. What 
does `setAllowParameterOverwriting` do? Will apply to all flags?
   > 
   > You can already provide a custom broker.conf file by setting the 
`PULSAR_BROKER_CONF` environment variable.
   > 
   > I think a better way is to remove the flag in the bin/pulsar file as long 
as things are backwards compatible.
   
   
   
   > I think a better way is to remove the flag in the bin/pulsar file as long 
as things are backwards compatible.
   
   @rdhabalia A scenario is to start multiple brokers on one server, because 
each broker uses a different port number, so use a different configuration 
file, when using the command `./bin/pulsar broker -c conf/broker-1.conf` to 
start the broker will throw an exception:
   
   ```
   2021-07-03 08:50:38,465 [sun.misc.Launcher$AppClassLoader@55f96302] error 
Uncaught exception in thread main: Can only specify option --broker-conf once.
   com.beust.jcommander.ParameterException: Can only specify option 
--broker-conf once.
        at 
com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:240)
        at 
com.beust.jcommander.JCommander.processFixedArity(JCommander.java:913)
        at 
com.beust.jcommander.JCommander.processFixedArity(JCommander.java:894)
        at com.beust.jcommander.JCommander.parseValues(JCommander.java:724)
        at com.beust.jcommander.JCommander.parse(JCommander.java:356)
        at com.beust.jcommander.JCommander.parse(JCommander.java:335)
        at 
org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.<init>(PulsarBrokerStarter.java:143)
        at 
org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:314)
   ```
   
   the current parameter `-c --broker-conf` is actually invalid, I think this 
is a bug. I tested this fix, I think it is backward compatible, the user can 
still continue to use the environment variables or the default way to start the 
broker, this parameter does not change the other commands, only affect the 
`./bin/pulsar broker` command. @murong00 Am I understanding this correctly?
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to