[
https://issues.apache.org/jira/browse/ZOOKEEPER-4389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17812667#comment-17812667
]
Sergey Kosarev commented on ZOOKEEPER-4389:
-------------------------------------------
Found solution: "--" instruct the commandline parser that no more options
should be parsed.
{code}
// "-1" is data
set /seata/server.maxCommitRetryTimeout -- -1
{code}
> Cannot create a data node whose value starts with "-"
> -----------------------------------------------------
>
> Key: ZOOKEEPER-4389
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4389
> Project: ZooKeeper
> Issue Type: Bug
> Components: scripts
> Environment: OS: CentOS 8.4
> zookeeper: 3.7.0
> Reporter: Ready
> Priority: Major
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I connect to ZooKeeper server via zkCli.
> I want to create a Znode using the following command:
> {code:java}
> // "-1" is data
> set /seata/server.maxCommitRetryTimeout -1
> {code}
> However, it threw an exception as follows:
> {code:java}
> org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: -1
> {code}
> I tried to use character " ( double-quote ) , ' ( single-quote ) or \ (
> backslash ) to escape, but it still did NOT work.
> I want to know, how should this special character be escaped in zookeeper?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)