如何执行netflix exhibitor post rest API?

wn9m85ua  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(489)

我需要为Zookeeper休息API,我指的是https://github.com/netflix/exhibitor/wiki/rest-configuration 但是我不能执行postapi。
我在哪里可以得到使用exhibitor的示例curl请求。或者可以有人请张贴一个例子来设置配置。curl查询如下所示,它需要config作为参数。

curl -i -X POST "http://hostname:8080/exhibitor/v1/config/set

那么,以任何配置作为参数的最终curl请求会是怎样的呢。所以基本上我不能添加参数。

hwamh0ep

hwamh0ep1#

我想出来了

curl -i -X POST “http://hostname:8080/exhibitor/v1/config/set” -d '{"rollInProgress":false,"rollStatus":"n/a","rollPercentDone":0,"hostname":"hostname.com","serverId":-1,"logIndexDirectory":"","zookeeperInstallDirectory":"","zookeeperDataDirectory":"","zookeeperLogDirectory":"","serversSpec":"","backupExtra":"","zooCfgExtra":{},"javaEnvironment":"","log4jProperties":"","clientPort":0,"connectPort":0,"electionPort":0,"checkMs":0,"cleanupPeriodMs":0,"cleanupMaxFiles":10,"backupMaxStoreMs":0,"backupPeriodMs":0,"autoManageInstances":0,"autoManageInstancesSettlingPeriodMs":0,"observerThreshold":0,"controlPanel":{}}'

你必须提供整个配置。改变你想要改变的财产的价值。

相关问题