public class

ConfigResource

extends ServerResource
java.lang.Object
   ↳ org.restlet.resource.Resource
     ↳ org.restlet.resource.ServerResource
       ↳ org.apache.helix.webapp.resources.ConfigResource

Class Overview

Class for server-side resource at "/clusters/{clusterName}/configs"

  • GET get scoped configs
  • POST set/remove scoped configs

  • Summary

    Public Constructors
    ConfigResource()
    Public Methods
    Representation get()
    Get scoped configs

    Usage:

  • Get cluster-level configs: curl http://{host:port}/clusters/{clusterName}/configs/cluster
  • Get instance-level configs: curl http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Get resource-level configs: curl http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}
  • Representation post(Representation entity)
    Set/remove scoped configs

    Usage:

  • Set cluster level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/cluster
  • Remove cluster level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/cluster
  • Set instance level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Remove instance level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Set resource level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}
  • Remove resource level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}
  • [Expand]
    Inherited Methods
    From class org.restlet.resource.ServerResource
    From class org.restlet.resource.Resource
    From class java.lang.Object

    Public Constructors

    public ConfigResource ()

    Public Methods

    public Representation get ()

    Get scoped configs

    Usage:

  • Get cluster-level configs: curl http://{host:port}/clusters/{clusterName}/configs/cluster
  • Get instance-level configs: curl http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Get resource-level configs: curl http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}

  • public Representation post (Representation entity)

    Set/remove scoped configs

    Usage:

  • Set cluster level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/cluster
  • Remove cluster level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/cluster
  • Set instance level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Remove instance level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/participant/{instanceName}
  • Set resource level configs: curl -d 'jsonParameters={"command":"setConfig","configs":"{key1=value1,key2=value2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}
  • Remove resource level configs: curl -d 'jsonParameters={"command":"removeConfig","configs":"{key1,key2}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{clusterName}/configs/resource/{resourceName}