In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to control the batch server, the article is very detailed, has a certain reference value, interested friends must read it!
Introduction
Batch servers are now managed by the Syracuse platform. This means that you can access the service using HTTP or https mode and a set of URL that controls it. Any tool can use different syntax.
You can do this in several ways:
1. List the batch server, and then call API for access
two。 Access the batch server directly through its code
3. Use the batch server scheduler
1. List batch servers and call API to access them
Gets a list of batch servers, if there are more than one.
Using myserv:port as the server hostname or address and the TCP port used by the Syracuse Web server, the URL will be:
Http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.$query
Be careful
In the URL above, the / api1 / segment can be used from the http client, which transmits authentication (for example, curl or postman). It manages the session as a Web service. When authenticating through the Web client, you can replace / api1 / with / sdata /.
The result of the request is similar to this feed. In this case, the $resource array contains a list of batch servers identified by the $key value. The status is also shown in the feed.
{
"$url": "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.%24query",
"$descriptor": "batchServers"
"$startIndex": 1
"$itemsPerPage": 20
"$totalResults": 1
"$ui": "http://192.168.3.141:8124/syracuse-main/html/main.html#ui=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$ui/master&data=http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers",
"$resources": [
{
"$uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"$key": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"$etag": 1
"$creUser": "admin"
"$creDate": "2019-12-22T07:24:39.619Z"
"$updUser": "admin"
"$updDate": "2020-08-07T00:36:50.404Z"
"$properties": {
"maxDelay": {
"$isDisabled": false
}
"killOverTime": {
"$isDisabled": false
}
"execInterval": {
"$isDisabled": false
}
}
"$url": "/ sdata/syracuse/collaboration/syracuse/batchServers ('39bf6186-37ddmur49caMurac20murc9a5af8fe705')? representation=batchServer.$details"
"$shortUrl": "/ sdata/syracuse/collaboration/syracuse/batchServers ('39bf6186-37ddmur49caMurac20murc9a5af8fe705')"
"status": "stopped"
"maxDelay": 0
"killOverTime": 30
"execInterval": 30
"auto": true
"code": "ERP"
"runtimes": [
{
"$uuid": "e8666836-85e7-4e63-8f54-6a8a985c10b8"
"$key": "e8666836-85e7-4e63-8f54-6a8a985c10b8"
"$etag": 1
"$creUser": "admin"
"$updUser": "admin"
"$updDate": "2019-12-22T12:19:45.034Z"
"$properties": {}
"$parent_uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"maxQueries": 5
"serverPort": 20100
"serverHost": "syracuseb"
"description": "syracuseb:20100"
"$links": {}
"$value": "syracuseb:20100"
}
]
"localePref": {
"$uuid": "ab378c10-6915-4cfe-8f1e-44b59824bebd"
"$key": "ab378c10-6915-4cfe-8f1e-44b59824bebd"
"description": "English (United States)"
}
"role": {
"$uuid": "58dd4404-e0cc-400c-856a-6824f09f1447"
"$key": "58dd4404-e0cc-400c-856a-6824f09f1447"
"description": "Super administrator"
}
"user": {
"$uuid": "535cf2da-9472-45f8-b505-068138598317"
"$key": "535cf2da-9472-45f8-b505-068138598317"
"login": "admin"
"firstName":
"lastName": "system administrator"
}
"refEndpoint": {
"$uuid": "55fac56e-9f7e-454e-90bc-e5143ccdee5d"
"$key": "55fac56e-9f7e-454e-90bc-e5143ccdee5d"
"description": "X3 / X3"
"nature": null
}
"x3solution": {
"$uuid": "5125619c-c8e6-40d9-b139-a95e29b943b2"
"$key": "5125619c-c8e6-40d9-b139-a95e29b943b2"
"solutionName": "X3"
}
"$links": {
"x3traces": {
"$title": "X3 server traces"
"$url": "/ sdata/x3/erp/X3_X3/$service/upload?fileName= [SRV] / TRA/serveur.tra&type=1&$format=txt"
"$method": "GET"
"$isDisabled": false
"$description": null
}
"start": {
"$isDisabled": false
}
"stop": {
"$isDisabled": true
}
"stopAll": {
"$isDisabled": true
}
"queries": {
"$isDisabled": false
}
}
"$value": "ERP"
"refUrl": "/ sdata/x3/erp/X3_X3"
}
]
"$links": {}
"$template": {
"$url": "http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers/$template"
}
"$prototype": "{$baseUrl} / $prototypes ('batchServer.$query')"
}
Request using POST
Send $key to a batch of servers to identify the relevant instances. It will replace the word KEY in the following URL.
Start the batch server identified by KEY
Http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/start?representation=batchServer.$query
Stop the batch server identified by KEY
Http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/stop?representation=batchServer.$query
Stop the batch server identified by KEY and all its running tasks
Http://myserv:port/api1/syracuse/collaboration/syracuse/batchServers('KEY')/$service/stopAll?representation=batchServer.$query
Note: the KEY here is the key value queried above.
Give an example
When you start batchServer, you can't get up the interface manually.
Http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/start?representation=batchServer.$query
"$uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"$key": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"$etag": 1
"$creUser": "admin"
"$creDate": "2019-12-22T07:24:39.619Z"
"$updUser": "admin"
"$updDate": "2020-08-09T08:13:53.855Z"
"$properties": {
"status": {
"$diagnoses": []
}
"maxDelay": {
"$isDisabled": true
}
"killOverTime": {
"$isDisabled": true
}
"execInterval": {
"$isDisabled": true
}
}
"$url": "/ sdata/syracuse/collaboration/syracuse/batchServers ('39bf6186-37ddmur49caMurac20murc9a5af8fe705')? representation=batchServer.$details"
"$shortUrl": "/ sdata/syracuse/collaboration/syracuse/batchServers ('39bf6186-37ddmur49caMurac20murc9a5af8fe705')"
"$diagnoses": [
{
"$datetime": "2020-08-09T08:35:43.914Z"
"$severity": "info"
"$message": "New client has been created on 2296 of syracuseb:20100"
}
{
"$datetime": "2020-08-09T08:35:43.914Z"
"$severity": "info"
"$message": "runtime 'syracuseb:20100' has been added to the list of servers for the batch controller, and the runtime will process five requests at a time."
}
{
"$severity": "info"
"$message": "Server batch is starting"
}
]
"status": "starting"
"maxDelay": 0
"killOverTime": 30
"execInterval": 30
"auto": true
"code": "ERP"
"runtimes": [
{
"$uuid": "e8666836-85e7-4e63-8f54-6a8a985c10b8"
"$key": "e8666836-85e7-4e63-8f54-6a8a985c10b8"
"$etag": 1
"$creUser": "admin"
"$updUser": "admin"
"$updDate": "2019-12-22T12:19:45.034Z"
"$properties": {}
"$parent_uuid": "39bf6186-37dd-49ca-ac20-c9a5af8fe705"
"maxQueries": 5
"serverPort": 20100
"serverHost": "syracuseb"
"description": "syracuseb:20100"
"$links": {}
"$value": "syracuseb:20100"
}
]
"localePref": {
"$uuid": "ab378c10-6915-4cfe-8f1e-44b59824bebd"
"$key": "ab378c10-6915-4cfe-8f1e-44b59824bebd"
"description": "English (United States)"
}
"role": {
"$uuid": "58dd4404-e0cc-400c-856a-6824f09f1447"
"$key": "58dd4404-e0cc-400c-856a-6824f09f1447"
"description": "Super administrator"
}
"user": {
"$uuid": "535cf2da-9472-45f8-b505-068138598317"
"$key": "535cf2da-9472-45f8-b505-068138598317"
"login": "admin"
"firstName":
"lastName": "system administrator"
}
"refEndpoint": {
"$uuid": "55fac56e-9f7e-454e-90bc-e5143ccdee5d"
"$key": "55fac56e-9f7e-454e-90bc-e5143ccdee5d"
"description": "X3 / X3"
"nature": null
}
"x3solution": {
"$uuid": "5125619c-c8e6-40d9-b139-a95e29b943b2"
"$key": "5125619c-c8e6-40d9-b139-a95e29b943b2"
"solutionName": "X3"
}
"$links": {
"x3traces": {
"$title": "X3 server traces"
"$url": "/ sdata/x3/erp/X3_X3/$service/upload?fileName= [SRV] / TRA/serveur.tra&type=1&$format=txt"
"$method": "GET"
"$isDisabled": false
"$description": null
}
"start": {
"$isDisabled": true
}
"stop": {
"$isDisabled": false
}
"stopAll": {
"$isDisabled": false
}
"queries": {
"$isDisabled": false
}
}
"$value": "ERP"
Check the status and start successfully
Stop it
Http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/stop?representation=batchServer.$query
View statu
Stop all
Http://192.168.3.141:8124/api1/syracuse/collaboration/syracuse/batchServers('39bf6186-37dd-49ca-ac20-c9a5af8fe705')/$service/stopAll?representation=batchServer.$query
The above is all the contents of the article "how to Control the batch Server". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.