【问题标题】:How to execute Netflix-Exhibitor POST REST APIs?如何执行 Netflix-Exhibitor POST REST API?
【发布时间】:2013-02-11 20:09:07
【问题描述】:

我需要 Zookeeper 的 REST API,我指的是 https://github.com/Netflix/exhibitor/wiki/REST-Configuration,但我无法执行 POST API。

我在哪里可以获得使用参展商的示例 curl 请求。或者有人可以发布一个示例来设置配置。 curl查询如下,需要config作为参数。

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

那么最终的 curl 请求将如何以任何配置作为参数。所以基本上我只是无法添加参数。

【问题讨论】:

    标签: rest hadoop apache-zookeeper netflix


    【解决方案1】:

    我想通了。 :)

    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":{}}'
    

    您必须提供整个配置。并更改您希望更改的属性的值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-10
      • 1970-01-01
      相关资源
      最近更新 更多