<managerRoot uri>/clusterusage[.<format>]
clusterConfig is the usage cluster resource. You can view the cluster configuration usage information through clusterConfig resource, and modify the configuration usage status of cluster. If it is the usage cluster status, you can also decide whether to use the local cluster service, or use other cluster services.
Use the local cluster service, that is the parent node will be provided the as GIS application server. Client can access the cluster parent node directory.
Use other cluster services. That is, GIS application server doesn't belong to a part of cluster services. It is used to receive the client request. And transmit to the cluster parent node to process.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/manager/clusterusage.rjson
Gets the configuration and usage info of the current cluster.
Execute the GET request to clusterConfig. Return the configuration of the current cluster, as follows:
Field | Type | Description |
DEFAULT_CONNECT_TIMEOUT | int | Default connection timeout, 20000 millisecond. |
DEFAULT_READ_TIMEOUT | int | Default reading timeout, 120000 millisecond. |
address | String | Cluster service address. |
connectTimeout | int | The child node connection timeout when using cluster service. The unit is millisecond. Default is 20000 millisecond. |
dataSyncInterval | Integer | The time interval that data files update. Unit is minute. Default is 30 minutes. |
enabled | boolean | Whether to use the cluster. The default is true. |
excludeFormats | String | Can not deploy/sync data formats to the controlled child node, separated by commas, such as "md5,txt,rmvb". |
includeFormats | String | Deploy/Sync data formats to the controlled child node, separated by commas, such as "smwu,udd,png". This field is no insignificance in this request. |
localAddress | String | Use the cluster iServer address. It can be accessed by the cluster service. |
readTimeout | int | The request of reading child node returned timeout when using cluster service. The unit is millisecond. Default is 120000 millisecond. |
reporters | List<ReporterSetting> | Reporter information list, that is, the configuration information list that the application to cluster service. |
status | Status | Cluster status. It is meaningful only when enabled is true. |
token | String | The credentials when using cluster. |
useLocalCluster | Boolean | Whether to use local cluster service. It is meaningful only when enabled is true. |
The returned rjson format representation after implementing the GET request on the clusterConfig resource http://localhost:8090/iserver/manager/clusterusage.rjson is as follows:
{
"DEFAULT_CONNECT_TIMEOUT": 20000,
"DEFAULT_READ_TIMEOUT": 120000,
"address": "http://localhost:8090/iserver/services/cluster",
"connectTimeout": 2000,
"dataSyncInterval": null,
"enabled": true,
"excludeFormats": null,
"includeFormats": null,
"localAddress": null,
"readTimeout": 120000,
"reporters": [{
"address": "http://anotherclusterservice:8090/iserver/services/cluster",
"enabled": false,
"isTileWorker": false,
"iserverId": "d7c64eb1ea1a4f11983082488ab9fba9",
"localAddress": null,
"token": ""
}],
"status": "OK",
"token": null,
"useLocalCluster": true
}
Modifies the configuration and usage of the cluster. If it uses the cluster, you can also modify whether to use the local cluster or other cluster service.
Following arguments need to be included in the request sent.
Name | Type | Description |
address | String | [Required] Cluster service address. |
connectTimeout | int | The child node connection timeout when using cluster service. The unit is millisecond. Default is 20000 millisecond. |
dataSyncInterval | Integer | The time interval that data files update. Unit is minute. Default is 30 minutes. This field is no meaning in this request. |
enabled | boolean | Whether to use the cluster. The default is true. |
excludeFormats | String | Can not deploy/sync data formats to the controlled child node, separated by commas, such as "md5,txt,rmvb". This field is meaningless in this request. |
includeFormats | String | Can not deploy/sync data formats to the controlled child node, separated by commas, such as "smwu,udd,png". This field is meaningless in this request. |
localAddress | String | Use the cluster iServer address. It can be accessed by the cluster service. |
readTimeout | int | The request of reading child node returned timeout when using cluster service. The unit is millisecond. Default is 120000 millisecond. |
reporters | List<ReporterSetting> | Reporter information list, that is, the configuration information list that the application to cluster service. This field is meaningless in this request. |
status | Status | Cluster status. It is meaningful only when enabled is true. |
token | String | The credentials when using cluster. |
useLocalCluster | Boolean | Whether to use local cluster service. It is meaningful only when enabled is true. |
The resource representation structure is as follows after implementing the PUT request.
Field | Type | Description |
succeed |
boolean | Whether to modify the usage status of cluster. |
Implement the PUT request ( http://localhost:8090/iserver/manager/clusterusage.rjson) on clusterConfig resource. You can modify the configuration usage status of cluster. When you change to use other cluster service, the sended request body is as follows:
{
"readTimeout": 120000,
"enabled": true,
"status": "OK",
"excludeFormats": null,
"localAddress": null,
"connectTimeout": 2000,
"includeFormats": null,
"address": "http://localhost:8090/iserver/services/cluster",
"token": "",
"useLocalCluster": false,
"reporters": [
{
"enabled": false,
"iserverId": "d7c64eb1ea1a4f11983082488ab9fba9",
"isTileWorker": false,
"token": "",
"address": "http://anotherclusterservice:8090/iserver/services/cluster",
"localAddress": null
}
],
"dataSyncInterval": null
}
The response result in rjson format returned is as follows:
{
"succeed": true
}
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the clusterConfig resource exists, or if the clusterConfig resource can be accessed by clients. It can also determine if the clusterConfig resource supports an output format <format> if performed on a URI with .<format> included.